[v4] Gatsby unable to query Strapi?

Hi,

I am using Strapi v4 and Gatsby v4. When I use the GraphQL playground in Strapi with the following query I get the result I expect:

query($id: ID) {
  service(id: $id) {
    data {
      id
      attributes {
        content
        slug
        title
        intro
      }
    }
  }
}

When I do the same query in the Gatsby playground I get the following error:

"Variable \"$id\" of type \"ID\" used in position expecting type \"StringQueryOperatorInput\".",

Is this just because the gatsby-source-strapi plugin has not been updated yet to work with v4?

Using:

  • Strapi 4.0.7
  • Gatsby CLI version: 4.7.0
  • Gatsby version: 4.6.2

Any help much appreciated.

Chris

gatsby-source-strapi plugin - Not supported at this time Strapi v4
What you can do as a solution is to integrate Apollo yourself.

Try: gatsby-plugin-apollo