Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row level query subscription not listening to deletes. #122

Closed
VaibhavAcharya opened this issue Jan 17, 2021 · 2 comments
Closed

Row level query subscription not listening to deletes. #122

VaibhavAcharya opened this issue Jan 17, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@VaibhavAcharya
Copy link

Bug report

Describe the bug

Realtime subscription of row level query is not able to listen to changes of type delete

To Reproduce

Here is a snippet of my code:

supabase.from(`posts:author=eq.${user.id}`)
        .on('*', (payload) => {
          console.log('changes: ', payload)
          fetchNewPosts();
        })
        .subscribe()

Expected behavior

It should be able to listen to all types of changes. But it only works for INSERT and UPDATE.

Screenshots

None.

System information

  • OS: Windows
  • Browser: chrome
  • Version of supabase-js: 1.2.1
  • Version of Node.js: v15..0.1

Additional context

None.

@VaibhavAcharya VaibhavAcharya added the bug Something isn't working label Jan 17, 2021
@VaibhavAcharya
Copy link
Author

I researched more and found out that this issue has been fixed in @supabase/realtime v0.7.11.
When is this dependency expected to be updated here?
It has been quite a time since that fix was released.😅

@kiwicopple
Copy link
Member

Hi @VaibhavAcharya, this is already released, but I imagine you are missing the "full" replication:

https://supabase.io/docs/client/subscribe#listening-to-deletes

you will need to run this to listen to deletes: alter table "your_table" replica identity full;

I'll close this now but feel free to reopen if it's a bug on our side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants