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
- rxdb integration code not working
https://appwrite.io/blog/post/offline-first-journal This code does not work with rxdb and appwrite packages set to february releases nor newest releases
- Costom domain Issues
Hi Appwrite team Weโre having issues verifying a custom domain. We added the required CNAME and CAA records to our DNS provider and waited for at least 2 days a...
- No domain visible after creating functio...
Saw this in docs yet i have no domain (Pro): ``` Generated domains In the Appwrite Console's sidebar, click Functions. Under the Domains tab, you'll find the g...