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
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...
- GB Hours IS NOT resetting
Hi, I was checking my usage and noticed that all of my usage quotas were reset on August 20, 2026, when my billing cycle renewed. Everything else appears to ha...