Hello,
Hope you can help me. I noticed for the actual quantity in an order I need to use currentQuantity and not quantity. See:
https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem#fields-2021-04
But unfortunately I get this errormessage in return:
{“errors”:[{“message”:“Field ‘currentQuantity’ doesn’t exist on type ‘LineItem’”,“locations”:[{“line”:1,“column”:176}],“path”:[“query”,“orders”,“edges”,“node”,“lineItems”,“edges”,“node”,“currentQuantity”],“extensions”:{“code”:“undefinedField”,“typeName”:“LineItem”,“fieldName”:“currentQuantity”}}]}
See the template I use. Without field currentQuantity the query works fine.
{“query”:“query{orders(query:"status:open",first:${ordernumbers}<#if cursor??>, after: "${cursor}"</#if>){pageInfo{hasNextPage,hasPreviousPage},edges{cursor,node{name,displayFulfillmentStatus,lineItems(first: 3) {edges {node {id,quantity,currentQuantity,fulfillmentStatus,product{id},variant{id},title,variantTitle,sku,discountedUnitPriceSet{shopMoney{amount,currencyCode}}}}}id,email,createdAt,customer{id},discountCode,totalDiscountsSet{shopMoney{amount}},totalShippingPriceSet{shopMoney{amount}},shippingAddress{firstName,lastName,address1,address2,city,zip,country,phone}}}}}”}
Thanks in advance,
Paul