FROM CACHE - en_header

GraphQL query not working

prativa
New Member
6 0 0
This query is not working. I get "{\"errors\":[{\"message\":\"Parse error on \\\"}\\\" (RCURLY) at [17, 9]\",\"locations\":[{\"line\":17,\"column\":9}]}]}"  this error in the response body.
 
It works on the Shopify  GraphQL app though. I  don't know what's wrong with my query. Could someone please help me?

 

 

 

fetch_query = 
      "query($ids: [ID!]!) {
          nodes(ids: $ids) {
            ... on Order {
              id
              customerJourney {
                moments {
                  ... on CustomerVisit {
                    utmParameters {
                      source
                      campaign
                      content
                      medium
                      term
                    }
                  }
                }
              }
            }
          }
        }
      }"
    fetch_body = {
      query: fetch_query,
      variables: {ids: ["gid://shopify/Order/3788714410115"]}
    }

    response = Shopify::GraphqlQuery.call(fetch_body, Shop.last)
    response.body 

 

 

 

  image.png

Replies 0 (0)