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:"
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.
According to your answer at [here](https://community.shopify.com/c/Shopify-APIs-SDKs/GraphQL-Cost-is-not-in-the-Response/m-p/603790#M40992), this is because I'm querying storefront API. I'm confused because I want to query admin api. According to your docs, order under storefront API does not have the field currentCartDiscountAmountSet, whereas order under admin API does have this field. I am getting the correct order with the field currentCartDiscountAmountSet, and so I presume that I'm querying admin api. But then again, I'm not getting data and extensions?
My questions are:
1. When using shopify-api-node, how to I specify if I want to query admin or storefront API?
2. Why am I not getting data and extensions in my response? Is it actually because I'm querying storefront api? If so, then why am I successfully able to get currentCartDiscountAmountSet?