Error in graphQuery

Hi need help with graphQuery.

have article.json file with

{
  "Sidebar": {
    "body1": {
      "type": "Slices",
      "fieldset": "Slice zone",
      "config": {
        "choices": {
          "integration": {
            "type": "Slice",
            "fieldset": "Integration",
            "description": "Integration info",
            "icon": "computer",
            "display": "list",
            "non-repeat": {
              "integration_id": {
                "type": "Number",
                "config": {
                  "label": "Integration ID",
                  "placeholder": "123"
                }
              }
            },
            "repeat": {}
          }
        }
      }
    }
  }
}

and build graphQuery in gatsby-config.js

        graphQuery: `
          {
            article {
              body1 {
                slices {
                  ...on integration {
                    integrationFields
                    primary {
                      integration_id
                    }
                  }
                }
              }
            }
          }
        `

and get an error - Error: Unable to parse fetch query Invalid fetch parsing Exception.
The field body1 must be a content relationship or a group.

Hello @v-oleho, The GraphQL syntax of Gatsby is different from GraphQuery. I see you added the Gatsby tag to your post. Is this accurate? I can help you build your API calls if you need.

Hi @Pau, I had build my GraphQL query but also I need GraphQuery for this query. Without GraphQuery all data is null in response.

 {
      allPrismicArticle {
        edges {
          node {
            id
            uid
            type
            data {
              body1 {
                ... on PrismicArticleDataBody1Integration {
                  slice_type
                  primary {
                    integration_id
                  }
                }
              }
            }
          }
        }
      }

I see the issue now. To retrieve the data from an Integration field, you only need to call the API Id of the field. It doesn’t work as a set of fields, like Slices or Content relationship fields: