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

fix: improve Supabase liveProvider filter handling #6573

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

OmkarBansod02
Copy link
Contributor

@OmkarBansod02 OmkarBansod02 commented Dec 11, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

Supabase Realtime doesn't support multiple filters, causing errors in requests when more than one filter is used.

What is the new behavior?

Supabase Realtime handles one filter at a time, logs a warning for multiple filters, and allows overriding the filter with meta.realtimeFilter for more control.

fixes #6360

Notes for reviewers

I’ve made the changes as discussed in the issue and added support for handling single filters in the Supabase liveProvider. Please take a look at the implementation and let me know if any further adjustments are needed.

@OmkarBansod02 OmkarBansod02 requested a review from a team as a code owner December 11, 2024 17:27
Copy link

changeset-bot bot commented Dec 11, 2024

🦋 Changeset detected

Latest commit: 89e14aa

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

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for refine-doc-live-previews ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6600f6b
🔍 Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/675c471c68fa130008993095
😎 Deploy Preview https://deploy-preview-6573--refine-doc-live-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

.changeset/shiny-panthers-nail.md Outdated Show resolved Hide resolved
.changeset/shiny-panthers-nail.md Outdated Show resolved Hide resolved
@BatuhanW BatuhanW added this to the January 2025 🎄 milestone Dec 17, 2024
@BatuhanW BatuhanW changed the base branch from main to next December 17, 2024 12:53
Copy link
Member

@BatuhanW BatuhanW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @OmkarBansod02 thanks for the updates. Did you test this one locally? Would be nice to have a screen recording with devtools enabled to see if this works as expected.

@OmkarBansod02
Copy link
Contributor Author

Hey @BatuhanW , I have tested the changes from the PR locally, and it appears to be working fine. Below are the screen recordings demonstrating the behavior with both a single filter and multiple filters:

  • Single Filter:
single.filter.mp4
  • Multiple Filters:
multiple.Filters.mp4

In the case of multiple filters, as expected, the system logs a warning and uses only the first filter. This matches the intended behavior outlined in the PR.

However, I didn't observe the WebSocket error mentioned in the issue description it's possible I may have missed something.
but from what I have observed, the changes implemented in this PR appear to be functioning correctly.

Please take a look and let me know if there are any other scenarios I should test.

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.

[BUG] Multiple Filters not Supported by Supabase Realtime
2 participants