Skip to content
Back

Realtime queries - do they work on response.events or only on response.payload?

  • 0
  • Self Hosted
  • Realtime
ddenev
21 May, 2026, 11:23

The current Realtime Queries docs are not very clear on the subject - when using queries to filter the subscription results, can we query on the response.events list or is the query applied only on the response.payload object? All examples in the doc seem to use payload properties so it's not clear to me if I can filter by event.

https://appwrite.io/docs/apis/realtime/queries https://appwrite.io/blog/post/announcing-realtime-queries

TL;DR
Realtime queries work on both response.events and response.payload.
Arnab Chatterjee
21 May, 2026, 12:51

Hey, it's on the payload But you can subscribe to the action channels as well

ddenev
21 May, 2026, 12:55

Yes, I am subscribing to Channel.tablesdb('<DATABASE_ID>').table('<TABLE_ID>').row() but only want to get notified on the databases.*.tables.*.rows.*.create, databases.*.tables.*.rows.*.update, and databases.*.tables.*.rows.*.upsert events. It seems I still need to filter those in the client code, cannot use a query for that.

Arnab Chatterjee
21 May, 2026, 13:01

lets try subscribing to this only Channel.tablesdb('sdf').table('df').row().create()

ddenev
21 May, 2026, 13:07

wow, I missed that I can do that. but does that mean I would need 3 separate subscriptions, i.e. 3 separate websocket connections?

Arnab Chatterjee
21 May, 2026, 13:08

no, its a subscription

Arnab Chatterjee
21 May, 2026, 13:08

If you are on cloud and using the new sdk, then Appwrite realtime works on a message based subscription and everything is incremental over a single socket

Arnab Chatterjee
21 May, 2026, 13:09

You can subscribe , unsubscribe, update to a subscribe and everything all on a single connection via message

ddenev
21 May, 2026, 13:09

I'm on self-hosted but I hope it works the same on self-hosted?

Arnab Chatterjee
21 May, 2026, 13:11

Ah okay then its going to give a bit of hunch cause these are all recently added and will be available on the next self-hosted release

Arnab Chatterjee
21 May, 2026, 13:11

then the best way is to use the manual filtering

ddenev
21 May, 2026, 13:12

you mean 1.9.1?

Arnab Chatterjee
21 May, 2026, 13:13

Not sure You will be notified when released but yeah on the very next release

ddenev
21 May, 2026, 13:13

ok, thank you very much for your help!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more