realtime-js
realtime-js copied to clipboard
All subscriptions fail if publication not turned on for any table that is subscribed to.
Bug report
If subscribing to multiple tables, and any of the subscribed tables does not have publication turned on, the subscription to all tables will fail, with no error being thrown.
To Reproduce
If I have two tables, cats and dogs, and I have only added cats to the publication, then do something like:
const channel = supabase
.channel("test")
.on(
"postgres_changes",
{ event: "update", schema: "public", table: "cats" },
(payload) => console.log(payload)
)
.on(
"postgres_changes",
{ event: "update", schema: "public", table: "dogs" },
(payload) => console.log(payload)
)
.subscribe();
...then no subscription events will be fired, regardless of whether the cats or dogs table has been updated.
No error is provided to indicate that the subscription has failed.
@yowzadave thanks for the feedback here. will discuss this will the realtime team. cc/ @chasers