Outline

We've created a template for our events, but we still need a page query to get the data we need.

In the video, we build the query using the GraphiQL explorer. Here's the finished query:

query EventPageQuery($id: String) {
    mdx(id: { eq: $id }) {
      body
      frontmatter {
        date
        title
      }
      id
    }
  }

We're passing in the ID of the MDX node in order to get the specific post we want.

Let's finish up the event layout in the next video by adding this query to the event-layout.js.

 

I finished! On to the next chapter