mitsy0_0Original post
Rank 2: Process
I am getting this error Query is not defined, when I try to retrieve the documents
I am not sure why, here is my function
Plain text
let promise = databases.listDocuments( "647ac763cf53edxxxx", "647ac820ba38520xxxxx", [ Query.orderDesc("age") ] );
promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });```Summary
The user is getting a "Query is not defined" error when trying to retrieve documents using the Appwrite API. They have imported the necessary modules correctly. One possible solution to this error is to check if an index has been created for the "age" attribute in the database.