I am not sure if this is a bug but whenever i try
const notDeletedQuery = Query.equal('deleted', false) databases.getDocument(col.databaseId, col.id, id, [notDeletedQuery])
It is returning undefined but i can clearly see that the document exists in the collection with given id and deleted = false
Am i doing something wrong ?
Just searching the id itself works and returns the proper document but querying with the bool is returning undefined
Appwrite database is secure by default. All documents are invisible to internet. You can mark whole collection or specific document visible by going into it's settings and giving read permission to any.
I am running it locally on my machine and the read permission is set properly.
The issue is only occuring when passing the above query
Aaah. I see. So if you getDocument without queries array, you get the document in return. It's only when you add the query that it wont reutrn your document. Am I right?
yes
Thanks for confirming π Let me try to reproduce quickly
Are you running latest Appwrite, 1.5.7?
i am on 1.5.6
Hmm I can confirm there seems to be a bug. cc @Jake
As seen on screenshots below, listDocuments work as expected, but getDocumentΒ doesnt.
As a quick solution, you could avoid query feature in your request. For example,
let doc = await databases.getDocument(col.databaseId, col.id, id)
if(doc.deleted) {
doc = null;
}
// Rest of your code
hmm, that is what i am doing for now. Thanks for checking it out.
Thanks for reporting this π We will work on a fix very soon.
Recommended threads
- Generate CSR
How do I generate a CSR for my domain host? They are asking me to generate one for my hoosting here on appwrite
- Appwrite Push Notifications: "Unknown er...
Hi all, I'm running into an issue with Appwrite push notifications in my web project. When I try to manually send a notification to a user from the Appwrite we...
- Realtime fails to connect/reconnect
I have been having trouble with my appwrite realtime connection for a few days now. Before the code that was working fine now is giving failed to connect errors