Skip to content

fix(supabase): merge realtime deletes in set mode - #670

Open
kerdofficial wants to merge 1 commit into
LegendApp:mainfrom
kerdofficial:fix/586-supabase-delete-set-mode
Open

kerdofficial wants to merge 1 commit into
LegendApp:mainfrom
kerdofficial:fix/586-supabase-delete-set-mode

Conversation

@kerdofficial

Copy link
Copy Markdown

Fixes #586

With mode: 'set' and realtime enabled, a DELETE event was applied with the plugin's set mode, so the whole collection was replaced by { [id]: Symbol(delete) }. INSERT and UPDATE already pass mode: 'merge'; this does the same for DELETE.

Added a test with a fake realtime channel: rows a and b, delete a, b stays. It fails without the change. npm test, bun run buntest, lint, format, typecheck and build pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legend-State Supabase Plugin - DELETE Events Break with changesSince: 'all' and mode: 'set'

1 participant