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
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...