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
Michael
~ a year 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
Daniel Berhane
~ a year ago

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

David House
David House
~ a year 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
Samuel Suther
~ 8 months ago

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