Is anyone struggling to get row-level realtime sub...
# javascript
p
Is anyone struggling to get row-level realtime subscriptions working? I've noticed when I use the catch-all subscription, things work as I expect, however if I switch to row-level, I don't receive any updates. ie:
Copy code
typescript
// ✅ this is working correctly (able to receive INSERT, UPDATE and DELETE events for the `board_cards` table):
const subscription = await supabase
  .from('*')
  .on('*', handler)
  .subscribe();

// ❌ this is NOT working correctly (unable to receive INSERT, UPDATE and DELETE events for the `board_cards` ):
const subscription = await supabase
  .from(`board_cards:list_id=eq.${someId}`)
  .on('*', handler)
  .subscribe();
g
I responded to the bug github thread, but this is probably not related to the bug as what you describe works for me with a function in the RLS.
You can look at the websocket channel to make sure the join message is sending the list_id you expect, also should check you are actually changing a row that the RLS allows that user see.
p
Hey @User, thanks for the help!
so I think you're right - this is an issue with my config
I double checked and turns out I was setting the schema as well - ie
public...
Copy code
typescript
  .from(`public.board_cards:list_id=eq.${someId}`)
removing the schema qualifier I'm now seeing RLS work as I expect 🙂 D'oh! Teaches me for not reading the docs closely enough.
g
"D'oh! Teaches me for not reading the docs closely enough." .... or showing your real code 😎
p
Yeah... Oof. It has been a long day to say the least. 😅
Appreciate your help.