I have a realtime connection listening on 'databases.$_mainDatabaseId.collections.$_collectonId.documents' and the stream is emitting the created item.
In my case I would like to have the stream of List<Document> .
To be more specific: I would like to listen to a specific query. Is that possible?
Summary
In a realtime connection, you can only have one document updated at a time, so having a list of documents doesn't make sense. If you want to filter documents, you'll need to do it client side in your callback function. There is a feature request to add server-side filtering by passing queries, so you can support the issue on GitHub. In your case, you can listen to a specific query by specifying it in the callback function.
Drake
Jul 14, 2023, 17:09
It really doesn't make sense to have a list of documents because only one document is updated at a time so it will always just be one document.
As for filtering, you'll have to filter client side in your callback. There's a feature request for filtering server side by passing some queries. I suggest you 👍 the issue: https://github.com/appwrite/appwrite/issues/2490