Admin api edit order

Shopify Partner
1 0 0



I'm creating a front end application that uses the admin graphQL api. We have a flow where we need to edit existing orders. In order to do that we use the `orderEditSetQuantity` mutation, however when we want to set the quantity to 1, the quantity returned in the `calculatedOrder` response is incorrect (it returns 3 but it should be 1). What we noticed though is that if we pass in the `calculatedLineItem` field in the query, then the response of `calculatedOrder` then works fine. This seems to be a strange bug with the API. What can I do from here?



sample of our query (quantity here returns 3 even though we pass in 1)


 mutation orderEditSetQuantity ( $id: ID!, $lineItemId: ID!, $quantity: Int! ) {
            orderEditSetQuantity(id: $id, lineItemId: $lineItemId, quantity: $quantity) {
                calculatedOrder { 
                      lineItems(first: 50) { 
                            nodes { quantity }
calculatedLineItem { id } works when this is present



Thank you,


Reply 1 (1)

Shopify Staff
1829 270 412

Hey @tristan_vu 


Thanks for raising this. Can you please DM me the store details/replication steps?

Scott | Developer Advocate @ Shopify