Skip to content

fix: handle multiple filters in Supabase Realtime liveProvider#7259

Open
themavik wants to merge 1 commit intorefinedev:mainfrom
themavik:fix/supabase-realtime-multi-filter-6360
Open

fix: handle multiple filters in Supabase Realtime liveProvider#7259
themavik wants to merge 1 commit intorefinedev:mainfrom
themavik:fix/supabase-realtime-multi-filter-6360

Conversation

@themavik
Copy link

Summary

Fixes #6360

Root cause: Supabase Realtime .on() only supports a single filter per subscription. The mapFilter function joined multiple filters with commas into a single string, which is not valid Supabase Realtime syntax, causing subscriptions to fail.

Changes

  • packages/supabase/src/liveProvider/index.ts: When multiple filters are provided, returns undefined instead of an invalid comma-joined filter string. This makes Supabase subscribe to all changes on the table.

Risk Assessment

Low - Single-filter behavior is unchanged. Multi-filter now gracefully degrades to unfiltered subscription instead of failing.

Supabase Realtime only supports a single filter per `.on()` call.
When multiple filters were provided, they were joined with commas
into an invalid filter string, causing the realtime subscription to
fail silently.

Now only passes a filter to Supabase when there's exactly one.
When multiple filters exist, subscribes without server-side
filtering to avoid the invalid payload.

Fixes refinedev#6360
@themavik themavik requested a review from a team as a code owner February 10, 2026 03:37
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: 403bbef

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

@BatuhanW BatuhanW changed the base branch from master to main February 12, 2026 08:23
@erenkurnaz
Copy link
Contributor

Hi @themavik, thanks for the contribution,

Instead of returning directly here, I think it would be better to log a warning. An early return might hide the issue and make debugging harder.

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