Back

[SOLVED] Query method not valid: select

  • 0
  • Databases
  • Web
  • Cloud
Debjit
13 Jun, 2023, 09:29

Need help, Can anyone help me by saying what is the problem with this query methond? return databases.listDocuments(awDatabase, awTable, [ Query.select(["$id","name",]), Query.equal("$id", uid), ]); I just need $id and name. Please share what is the problem here. Getting 400 error

TypeScript
{message: "Query method not valid: select", code: 400, type: "general_argument_invalid",…}
code
: 
400
message
: 
"Query method not valid: select"
type
: 
"general_argument_invalid"
version
: 
"0.10.37"
TL;DR
The problem is that the `Query.select` method is not valid in the current version of the software being used. The version being used is 1.1.2. This method is only available in version 1.3.x or higher. As a result, the query is not working and a 400 error is being returned. To resolve this, you can either update to a version that supports the `Query.select` method or find an alternative way to select only the desired fields.
Binyamin
13 Jun, 2023, 13:02

Query.select is part of version 1.3.x releases. Cloud still uses 1.1.2

Drake
13 Jun, 2023, 14:51

Query method not valid: select

Drake
13 Jun, 2023, 14:52

[SOLVED] Query method not valid: select

Debjit
13 Jun, 2023, 16:15

So is there any way I can get only limited number of field?

Binyamin
14 Jun, 2023, 03:18

Not in the cloud for now, just on a self-hosted using version 1.3+

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