
Hi, I'm trying to retrieve character documents which have an attribute "userId" from a query, but the response is always an empty document.
const response = await databases.listDocuments(
process.env.APPWRITE_DATABASE_ID,
process.env.APPWRITE_CHARACTER_COLLECTION_ID,
[
Query.equal('userId', userId),
// Query.select(["characterId"])
]
)
if (response && response.documents) {
log(response)
return {
success: true,
response,
total: response.total
};
} else {
return {
success: false,
message: "Received response in unexpected format",
data: response
};
}
Here are some things I've checked - ✅ Document exists with correct userId. ✅ Collection has permission for all users. ✅ collection has an attribute named userId which is also made an index. ✅ function executes, payload is recieved correctly.
Any help is appreciated.
Recommended threads
- Do I need Redis if using appwrite
Saw appwrite has built-in redis, but does this work for listdocuments, getdocument and other query etc? what does the appwrite redis covers under the hood?
- 404 for self-host
docker-compose.yml: x-logging: &x-logging logging: driver: 'json-file' options: max-file: '5' max-size: '10m' services: traefik: ima...
- Is p-limit compatible with Appwrite?
I have a function that makes asynchronous calls to different Appwrite collections. This is how I make the call: ```js await Promise.allSettled([ ...
