Skip to content

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

Open
@amerryma

Description

@amerryma

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
supabase/realtime-js#97

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions