How to Build a Static Blog with Gatsby and Strapi

In this step-by-step guide, you will learn how to harness the power of Gatsby, a blazing-fast static site generator, and Strapi, a composable CMS, to create a dynamic yet performant blog.


This is a companion discussion topic for the original entry at https://strapi.io/blog/how-to-build-a-static-blog-with-gatsby-and-strapi

Hi there I am following the tutorial and I am getting stuck with the following graphql query. Have I done done something wrong?

query ($id: String) {
    strapiPost(id: {eq: $id}) {
      author {
        avatar
        name
      }
      category {
        name
        slug
      }
      content {
        data {
          childMarkdownRemark {
            html
          }
        }
      }
      cover
      date(formatString: "MMMM D, YYYY")
      description
      slug
      title
    }
  }
"Cannot query field \"data\" on type \"STRAPI_POSTContent\".",

I got a valid response when running that query.

Make sure you have the backend strapi server running when you attempt to query it from the gatsby graphiql page.