Back

Query.select not working, throwing this error for no reason

  • 0
  • Databases
El Drago Uchiha
3 Sep, 2023, 06:39

{ "message": "Query method not valid: select", "code": 400, "type": "general_argument_invalid", "version": "0.10.51" }

How i am calling it:

const documentListResponse = await databases.listDocuments( process.env.NEXT_PUBLIC_DB_ID , process.env.NEXT_PUBLIC_COLLECTION_ID, [ Query.equal("user_id", user?.$id), Query.orderDesc("$createdAt"), Query.limit(10), Query.offset(offset), Query.select([ "user_id", "sol_id", "soltype", "solu_status", "cresed", ]), ] )

TL;DR
The user is experiencing an error with Query.select not working and receiving a "Query method not valid: select" error message. The issue is that the query method is not available in the cloud version being used (1.1.2), but it was added in version 1.3.0. The user suggests adding a note in the documentation to clarify this. Solution: Update the cloud version to 1.3.0 or use a different query method that is available in the current cloud version.
Drake
3 Sep, 2023, 06:49

That query is not available on cloud because cloud is on version 1.1.2 but that query was added in 1.3.0

El Drago Uchiha
3 Sep, 2023, 06:54

Ok Thanks, but its shown in documentation, so that's kinda condfusing. Please add some kind of Note there to let Devs know about this.

Guille
3 Sep, 2023, 16:38

You can check documentation version for cloud selecting it from the dropdown menu

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