Try to infinite scroll pagination

The offset is basically using the limit + start as you mentioned. Setting the limit to say 25 and your start at 0, then just increase the start by the limit

(I’m using REST as an example just to show an easy example, but the same applies GraphQL)

localhost:1337/somemodel?_limit=25&_start=0
localhost:1337/somemodel?_limit=25&_start=25
localhost:1337/somemodel?_limit=25&_start=50
localhost:1337/somemodel?_limit=25&_start=75
localhost:1337/somemodel?_limit=25&_start=100
localhost:1337/somemodel?_limit=25&_start=125
ect

With GraphQL you can send the limit and start as variables (I’m using a limit of 3 just to show a clear example, and this is one of my personal projects)

start 0, limit 3

start 3, limit 3


For the implementation in your frontend, that largely depends on your framework.

3 Likes