
Hi, i can't manage to use listDocuments with node-appwrite. Documentation invites me to use Query.equal, but an error throws for invalid query. copilot insists that i use just array of strings, but all tries become invalid query errors.
what's is the right way to search in documents with node-appwrite 12 ?
here's my code :
const filters = [
`guildId==${guildId.toString()}`,
`slug=='${slug}'`
];
const giveaways = await databases.listDocuments(
appWriteConfig.databaseId,
appWriteConfig.giveawayCollection,
filters);
throw new Error(error.message);
^
Error: Invalid query: guildId==1205061903601369118
many thanks !

if i write :
const filters = [
Query.equal('guildId', guildId.toString()),
Query.equal('slug', slug)
];
const giveaways = await databases.listDocuments(
appWriteConfig.databaseId,
appWriteConfig.giveawayCollection,
filters);
i obtain : throw new Error(error.message); ^
Error: Invalid query: {"method":"equal","attribute":"guildId","values":["1205061903601369118"]} at Giveaway.retrieve (giveaway.js:69:15)

Recommended threads
- Stuck at pinging the server to finish ad...
I'm not using the starter app and I'm not sure how to finish connecting my app to Appwrite.io. Is there a CURL command I can run to finish setup?
- 500 internal error
I get a 500 internal error when trying to access my database on appwrite cloud. Sometimes it would start working but this time it never corrects.
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
