What is the correct syntax to trigger a realtime event only on my 3 collections for every document? With or without the brackets?
client.subscribe( ['databases.[63446ca755a041305f7f].collections.[66f7fce6002b828c5b50].documents', 'databases.[63446ca755a041305f7f].collections.[667be4de65e1cbaedb43].documents', 'databases.[63446ca755a041305f7f].collections.[667698d85d98f40d9f97].documents', 'files'], response => { // Callback will be executed on changes for documents and all files. console.log("realtime :", response); this.realtimePayload = response.payload; });
see - https://appwrite.io/docs/apis/realtime for examples
and here's the correct channel formats - https://appwrite.io/docs/apis/realtime#channels
also you dont need brackets [].
should be just -
databases.databaseID.collections.collectionID.documents
where databaseID & collectionID are the actual IDs.
thank you very much 🙏
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...