Skip to content
Back

Returned columns when Query.select is used

  • 0
  • Databases
apperside
10 Jan, 2026, 08:19

Hello, I am noticing that whatever i put in Query.select, the returned data will always contain the following fields

"total": 1, "rows": [ { "$sequence": 34, "$createdAt": "2026-01-08T11:02:11.330+00:00", "$updatedAt": "2026-01-08T11:08:43.799+00:00", "$permissions": [ "read(\"user:12345\")", "update(\"user:12345\")", "delete(\"user:12345\")" ], "$databaseId": "my_db_id", "$tableId": "my_table" } ]

Beside the fact that I think that many of those fields are internal system details that should not be exposed unless explicitly requested, if in my Query.select I put for example only the $id field

Query.select(["$id"])

why should I have all of those fields as well? It's ok that returning them is the default behaviour, but if I have explicitly reqeusted specific fields, i expect just them and no more others.

TL;DR
Issue: Returned data contains additional system fields even when specific fields are requested using Query.select. Solution: To only receive the explicitly requested fields in Query.select and exclude the system fields, you can use the Query.projection method along with Query.select to precisely define the fields you want to retrieve. For example: ``` Query.select([]) Query.projection( { "$id": 1 } ) ``` Combining Query.select([]) with Query.projection allows you to customize the returned data and exclude the unwanted system fields.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more