Solved

Data and Extensions Not Returned in GraphQL Query to Admin API

asoola
Tourist
14 0 1

Hi,

I am trying to make a graphql request to shopify's admin api. I am using the official shopify-api-node library.

My query is as follows

 

  const response = await shopify.graphql(`
        {
          order(id:"<some order id>") {
            currentCartDiscountAmountSet {
              shopMoney {
                amount
                currencyCode
              }
            }
          }
        }
      `);
Copy

 

 

[some order id is a admin graphql id]

From my understanding, this should return an object with a data field and an extensions field (I'm interested in query cost).

The response I get is simply contains order.

Why am I not getting data and extensions in my response? 

Accepted Solution (1)

Gregarican
Shopify Partner
1033 86 285

This is an accepted solution.

Have you checked the callGraphqlLimits property? It's described here --> https://www.npmjs.com/package/shopify-api-node

View solution in original post

Replies 2 (2)

Gregarican
Shopify Partner
1033 86 285

This is an accepted solution.

Have you checked the callGraphqlLimits property? It's described here --> https://www.npmjs.com/package/shopify-api-node

asoola
Tourist
14 0 1

Yeah you're right, thanks!