Hi, we are building the blog/news part of our website. We need to paginate on all blog entries and we have page numbers in our design. We are currently using GraphQL to query the content.
After checking the documentation (Query Data with GraphQL - Prismic), we couldn't find a way to load contents on a specific page of the result set. We were able to iterate with like 10 blogs per page, but GraphQL does not seem to have a way to load an arbitrary page from the result set.
Can you please guide us on the way to implement pagination properly?
It depends on what you need to retrieve. You can query documents by their metadata (id, uid, lang, tags) or using a content field, like a number or a Rich Text field
As you've seen this sort of pagination isn't possible with the GraphQL API and the only workaround is to build the pagination into your app clientside. I can see why this can be tricky to implement and maybe not so performant in your case.
I've tagged this as a feature request and passing the info to our dev team. Though this isn't something that they are working on at the minute. If/when this ever changes they will contact you here.