
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
let promise = databases.listDocuments(
"647ac763cf53edxxxx",
"647ac820ba38520xxxxx",
[
Query.orderDesc("age")
]
);
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});```

Have you created an index for the age attribute?

yes

but none of the queries are working

Are you appwrite cloud or its self hosted?

cloud

Do you import Query ?

you mean here const { Client, Account, ID, Functions, Databases} = Appwrite;
?

I imported it now it works

thanks๐
Recommended threads
- Realtime Disconnects and Error: INVALID_...
Hi Support, we are still experiencing the issue and we are a subscriber on your platform under the account of charlesbcalague@gmail.com I just want to ask here...
- Collection Permission issue
I am facing issue in my Pro account. "Add" button is disabled while adding permission in DB collection settings.
- Opened my website after long time and Ba...
I built a website around a year back and and used appwrite for making the backend. At that time the website was working fine but now when i open it the images a...
