Skip to content

DELETE realtime event not being triggered with RLS subscription #5495

@ize8

Description

@ize8

Bug report

when subscribing for Realtime Updates + listening to row-level changes, then the DELETE event won't get emitted

Describe the bug

when listening to row-level changes, DELETE event won't be emitted on row delete. Probably because the relevant record won't satisfy the row-level filter as it is being removed.

To Reproduce

const mySubscription = supabase
  .from('foods:cook_id=eq.200')
  .on('*', handleRecordChanged)
  .subscribe()

INSERT and UPDATE will trigger the callback as expected when changing any food that has cook_id = 200, but upon deleting a record DELETE won't get triggered. Probably because the record does not satisfy the filtering criteria (cook_id=200) anymore as it is being deleted.

Expected behavior

DELETE event to be triggered as expected before row gets removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions