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

[BUG] Multiple Filters not Supported by Supabase Realtime #6360

Open
amerryma opened this issue Sep 19, 2024 · 0 comments
Open

[BUG] Multiple Filters not Supported by Supabase Realtime #6360

amerryma opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@amerryma
Copy link

Describe the bug

Right now, Supabase Realtime does not support multiple filters. If used, the live provider for supabase will send an invalid filter payload, causing the realtime request to fail.

Steps To Reproduce

  1. Create any realtime resource
  2. Add more than 1 filter to the resource (I was using a useList hook with multiple objects in the filters option)
  3. Watch websocket network requests, it will show an error.

Expected behavior

I think we should either log a warning if we see multiple filters, or naively take the first one?

Packages

  • supabase realtime v2.30.34 (not latest, but also not fixed in latest)
  • @refinedev/supabase 5.9.4

Additional Context

See here for Refine's implementation, where it is joining each filter with a comma.

https://github.com/refinedev/refine/blame/8be95d808ae2f3f280ebd015bd95eb04238fe463/packages/supabase/src/liveProvider/index.ts#L67

See here for feature that is being discussed. No real activity it seems.

supabase/realtime#486

@amerryma amerryma added the bug Something isn't working label Sep 19, 2024
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

1 participant