
Hi, how to show user specific data like in a collection we are storing all users data but how to fetch only users specific data, as i have tried this Query.equal("\$id", getuserId.$id),
is there is any other way?

One way to do it would be to leverage document-level read permissions so that you're setting each document to be viewed only by the user that creates the document.

https://appwrite.io/docs/permissions#example-1
This should give an idea how

The $id attribute in the collection would be the id of the document, not the user. So that query would not work.
If you want to leverage a query like that, you would to create an additional createdBy
attribute and save the creating user's ID there.
That being said, the Permissions system is definitely a more secure way to achieve the same.

its sounds good, let me check the link.

this will be better approach ?Permission.delete(Role.user("getuserId.$id"))

i have one doubt, should we have to specify the role while creating the document because while fetching there is no optional parameter for specifying permission, am i right?

Yeah, permissions is define on create/update, not on fetch
Recommended threads
- Row with the requested ID already exists...
I’m hitting a blocking issue creating rows in Appwrite (both from the console and my React Native app). After successfully inserting the first row, every subseq...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
