Help with graphQL queries

I’m learning how to use the graphQL Queries using Node.JS and i’m running into this issue.

shopifyAUTH = {
headers: {
“Content-Type”:“application/json”
,
“X-Shopify-Access-Token”: < my access token> ,
},
auth: {
username: < my username>,
password:
},
};

the following works:

let query = ‘{“query”: “query { draftOrders(first: 10) { edges { node { id } } } }”}’

axios.post(url,query,this.shopifyAUTH).then((result)=>{
}

However, this is giving me a error and i can’t figure out why.

let query = ‘{“query”: “query { draftOrders(first: 10, query: “status:OPEN”) { edges { node { id status } } } }”}’;

axios.post(url,query,this.shopifyAUTH).then((result)=>{
}
It seems like every query i make with arguments query, it fails and gives me an error of
query: ‘Required parameter missing or invalid’ .

Any help/advice would be appreciated :slightly_smiling_face:

Hey @kwangEra , that request should work and at the very least throw back an empty array as a response. Could you share an X-Request-ID from an example API call where you received the “'Required parameter missing or invalid”. The request ID should be included in the response headers that are sent back from us.

Hope to hear from you soon!