Create Data Driven Pages in Gatsby with GraphQL and createPages

InstructorJason Lengstorf

Share this video with your friends

Send Tweet

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.

Michael
~ 5 years ago

Code from the video doesn't work -- got this error in the console:

9:32 error Expected type eventFieldsEnum, found startDate. Did you mean the enum value start_date?

Daniel Berhane
~ 5 years ago

This video does not work. I am getting the error message, "undefined. Exception: ERROR_LOADING" playing this video

David House
~ 5 years ago

Content is great, but it was often difficult to type along with you because of your IDE function introspection window. It would often obscure what you most recently typed, and there were times where what you typed was only visible for a split second. Please disable this IDE feature in future videos! :)

Samuel Suther
~ 4 years ago

On Line 70 it must be "result.errors" instead of "reporters.errors"