Data and Extensions Not Returned in GraphQL Query to Admin API

Solved
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? 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 246

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!

0 Likes