fix(supabase): handle multiple filters in liveProvider
Summary
- Fixed the Supabase liveProvider to properly handle multiple filters
- When multiple filters are provided, only the first filter is used
- Added a console warning to inform developers about this limitation
Changes
- Modified
mapFilterfunction inpackages/supabase/src/liveProvider/index.tsto use only the first filter instead of joining all filters with commas - Added warning message when multiple filters are detected
- Added changeset documenting the fix
Context
Supabase Realtime only supports a single filter per subscription (see https://github.com/supabase/realtime/issues/486). The previous implementation joined multiple filters with commas, which caused invalid filter payloads and websocket errors.
Test Plan
- [ ] Verify that single filter subscriptions continue to work as expected
- [ ] Verify that multiple filter subscriptions use only the first filter
- [ ] Verify that a warning is logged when multiple filters are provided
- [ ] Check that no websocket errors occur with the new implementation
Resolves #6360
🦋 Changeset detected
Latest commit: 7096fbc730607d67a5ae36111293a923e97d3058
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @refinedev/supabase | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Deploy Preview for refine-doc-live-previews ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 7096fbc730607d67a5ae36111293a923e97d3058 |
| Latest deploy log | https://app.netlify.com/projects/refine-doc-live-previews/deploys/68feacc07f44e50008b04392 |
| Deploy Preview | https://deploy-preview-7091--refine-doc-live-previews.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.