1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Create Data Driven Pages in Gatsby with GraphQL and createPages

    gatsbyGatsby
    >=2.13.1

    To create pages in Gatsby, there are 4 steps needed before actually doing the thing:

    • ensure data directory exists
    • define the event type
    • define resolvers for custom fields
    • query for events

    Now that these are done (see lesson 03 and lesson 04. Lets create the allEvent query and loop through the result with createPages.

    For a written version of this course, check out the Gatsby docs.