Data and Extensions Not Returned in GraphQL Query to Admin API

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?

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

Yeah you’re right, thanks!