Back

ListDocument not returning all data using node-appwrite

  • 0
  • Databases
  • Cloud
Franco van Vuuren(u21463702)
29 Jan, 2024, 19:25

So I have a collection that I am trying to retreive all the data from. There is a total of 77 documents in the collection, this is correctly indicated in the response from the listdocuments query.

However only 23 of my actual documents are retrieved, I suspect this is due to some limitation on the amount of documents that can be returned, if so is there some mechanism like pagination to work around this in the node-appwrite SDK as I have not seen any?

TL;DR
Developers are experiencing an issue where the ListDocument function in the node-appwrite SDK is not returning all the data from a collection. The response only includes 23 out of 77 documents. They suspect there may be a limitation on the number of documents that can be returned. A solution is provided to either increase the limit to 5000 documents per request using `Query.limit(5000)` or implement pagination to retrieve the remaining data.
kamal.panara
29 Jan, 2024, 19:32

Hi @awenjoyer there is limit of 25 docs per request.

You can always increase it upto 5000 docs per request or you can use pagination to save bandwidth and increase loading speed on your frontend app, and enhance the user experience!

kamal.panara
29 Jan, 2024, 19:34

You can use Query.limit(5000) to retrieve 5000 docs per request, which is max limit in Appwrite cloud.

kamal.panara
29 Jan, 2024, 19:38
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more