hi , so currently trying to move from pocketbase to appwrite and kinda stuck.. I wanna implement realtime for all collections so users get updated records all the time.. im using treact native sdk and I can fetch collection but realtime doesn't work as I keep getting
Realtime got disconnected. Reconnect will be attempted in 1 seconds. Stream end encountered am I doing something wrong ?
import {Client, Databases} from 'react-native-appwrite';
const fetchEvents = async () => { try { let result = await databases.listDocuments(databaseId, collectionId); let documents = result.documents;
setEvents(documents);
console.log('Documents:', events);
client.subscribe(`collections.${collectionId}.documents`, (response) => {
let updatedDocuments = response.payload;
setEvents(updatedDocuments);
console.log('Updated Documents:', updatedDocuments);
});
} catch (error) {
console.error(error);
}
};
Recommended threads
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...
- Index for combination of columns
How am i suppposed to apply index so that combination of two columns alwasy remain unique in appwrite table though console