Back

Pagination within Functions

  • 0
  • Functions
tbsvttr
21 Aug, 2023, 08:13

Last Friday I fixed a bug in one of our server side functions where it became clear that not all records where considered because of pagination. I see the value of pagination when sending data to the client via a REST interface (or something like that), but when I query data on the server it feels kinda wired. In this cases I wanted to get all foreign keys from a certain field of that collection. So I needed to recursively cursor over the whole thing. Is there a way to avoid this?

We use Web/ JS on the client and Node.js in the Functions.

TL;DR
The user is asking for a way to avoid pagination when querying data on the server using Web/JS on the client and Node.js in the Functions. Pagination is recommended for performance and to avoid overwhelming the server. The user can increase the limit up to 100 or 5000 by sending 'Query.limit(100)' with the request. However, the user is experiencing a bug where not all records are considered due to pagination. No solution is provided in the support thread.
joeyouss
21 Aug, 2023, 12:17

Hi, what is the current size you are working with in pagination?

tbsvttr
22 Aug, 2023, 13:30

Default, which is 25. But the problem is always there.

Binyamin
22 Aug, 2023, 13:54

If it's the cloud you can change the limit up to 100 and in the latest version up to 5000 To do so send Query.limit(100) with your request.

Binyamin
22 Aug, 2023, 13:55

But it's recommend you use the pagination for performance and overwhelming your sever.

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