Paginating documents

Hi,

I see in the docs the max amount of documents one can query is 100. How can I run a pagination to retrieve all of my documents for a specific type?

Thanks in advanced for your help!

1 Like

Hello Sam, welcome to the Community!

For the moment, it isn't possible to increase this number in the API response. What you can do is implement pagination in your queries so you can get more than these initial docs.

Also, is important to note that in the latest version of the @prismicio/client kit the total number of documents returned is always 100. In previous versions, it is 20.

1 Like

Thanks for your response Pau, I appreciate your help! I'm wondering if you or anyone in the community is able to provide an example of implementing pagination in a query, as I've struggled to implement it and have not found examples online.

Best,
Sam

For the moment, we only have an example with React and GraphQL.

I'll add a note in our backlog to consider adding a similar example for plain javascript in the future.

1 Like