Skip to content

Latest commit

 

History

History
 
 

using-pagination

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Working with pagination in GraphCMS

Join our Slack

This example demonstrates ways you can paginate GraphCMS queries.

  • Generate numbered pages. This example generates a number of static pages based on a total count and a 'per page' limit.
  • Larger result sets. GraphCMS has a default result set size of 100 entries, which can be increased up to 1000 entries. This example using a for await statement to 'loop' requests until all data matching the desired query is returned.

This example is built with Next.js and graphql-request.

Demo

Deploy with Vercel

How to Use

Download Manually

npx degit graphcms/graphcms-examples/using-pagination using-pagination

Install & Run:

cd using-pagination
npm install
npm run dev
# or
cd using-pagination
yarn
yarn dev

Run on Codesandbox

Develop with Codesandbox