
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
- Looking for Partner
I'm looking for a partner for long-term collaboration. Of course, you'll get paid for it. If you are interested, please send a DM to me
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey Iโm running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
