1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

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.