
Hi, I am trying to run a query which used $id of the document but I keep getting an error that $id not found. Do I have to make an index for $id or $id is privately used by appwrite? In the meantime I have added an attribute for my own custom user_id implementation.

What version of Appwrite are you on?

v 1.3.8

Can you show your code?

I am just using a Query:
await this.getDatabase(this.getClient()).listDocuments(environment.api.database_id, collectionId, [
Query.equal('$id',1)]);

Did you try creating an index for it?

no, that is what I am confused about. do I need to create an index or is $id not available to be used outside of appwrite?

I don't think $id
is restricted like that. Why not try creating and check it?

👍

why not use getDocument()
? 🧐

for getDocument I need the document id. I am asking whether I can use $id for queries or not as I tried and got an error that $id not found.

I don't understand the difference

This is finding a document with $id == 1.... Which is getDocument(DB, collection, 1)
Recommended threads
- Messaging via Resend: "to": "\"undisclos...
I'm using the node-appwrite@18.0.0 SDK. ``` await messaging.createEmail({ messageId: ID.unique(), subject: "Subject", content: `htmlCont...
- Internal 500 Server Error
I don't have much information but I am unable to create anything on database, Auth users are creating but not able to fetch into database
- CORS + 401 Error with Appwrite Authentic...
I'm getting a CORS + 401 Error with Appwrite Authentication Access to fetch at 'https://cloud.appwrite.io/v1/account/sessions/email' from origin 'https://my-c...
