DEV Community


GraphQL + Next.js | Working with getStaticProps, getStaticPaths and GraphQL

notrab profile image Jamie Barton ・1 min read

In this short tutorial we will programmatically create pages for data stored in GraphCMS. You could build pages for absolutely any content model, but in this example we explore creating pages for GraphCMS swag.

We use the latest getStaticProps and getStaticPaths methods in available Next.js 9.3 and above, as well as using graphql-request to query our data via GraphQL.

Discussion (0)

Editor guide