I’ve read the DatoCMS docs on GraphQL pagination (https://www.datocms.com/docs/content-delivery-api/pagination) which explains the first
(page size) and skip
(page offset) properties.
But, how would one render full pagination controls? Such as:
- Prev/Next + individual page numbers (eg: https://bulma.io/documentation/components/pagination/)
- Prev/Next, with “Next” disabled/hidden if at end of paging
I haven’t paginated with GraphQL before. Reading their docs (https://graphql.org/learn/pagination/), they recommend additional API properties. That’s what I’m used to on traditional REST API endpoints too: some sort of totalCount
property so I can calculate how many pages to expect, and whether a “next” page is available.
But I’m looking through the DatoCMS docs and the API explorer, and not seeing similar properties (totalCount
, cursor
, hasNextPage
, etc).
Is there a way to render client pagination controls with DatoCMS GraphQL?