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
- Cannot delete rows, deleted relationship...
I had defined a two-way relationship between 2 tables, then I deleted the relationship column I tried re-creating the column but I started to get errors about t...
- Maximum Row Size
I'm busy creating a little side project which uses Appwrite as the Backend. I scraped a site and uploaded the data to the database, but I've reached 5000 rows (...
- Helpp
Hi everyone, i need help. So i am working on this project and database relationship thingy is not working anymore, normally when you link two table you should b...