refine icon indicating copy to clipboard operation
refine copied to clipboard

fix(supabase): handle multiple filters safely for Supabase Realtime (Fixes #6360)

Open vivekkumarrathour opened this issue 1 month ago • 1 comments

Supabase Realtime rejects payloads when multiple filters are provided. This change:

  • warns when multiple filters are passed,
  • uses only the first filter by default to avoid invalid payloads,
  • provides an escape hatch via meta.realtime.allowMultipleFilters.

Fixes #6360


PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://refine.dev/docs/guides-concepts/contributing/#commit-convention

Bugs / Features

  • [x] Related issue(s) linked (#6360)
  • [ ] Tests for the changes have been added (not applicable — runtime fix only)
  • [ ] Docs have been added / updated (not required for this bug fix, but can be added by maintainers)
  • [x] Changesets have been added https://refine.dev/docs/guides-concepts/contributing/#creating-a-changeset

What is the current behavior?

Refine joins multiple filters into a comma-separated string and sends them to Supabase Realtime.
Supabase Realtime does not support multiple filters, so this results in:

  • invalid realtime payload
  • failing websocket subscription
  • no live updates

What is the new behavior?

  • When more than one filter is provided:
    • A warning is shown in the console.
    • Only the first filter is sent to Supabase, avoiding invalid payloads.
  • If a user wants the old behavior, they can explicitly enable:
meta.realtime.allowMultipleFilters = true

vivekkumarrathour avatar Nov 25 '25 16:11 vivekkumarrathour

⚠️ No Changeset found

Latest commit: 31cf5b4633954f6dfa807093704aa0b2fc0b843a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 25 '25 16:11 changeset-bot[bot]