Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Admin api edit order

Admin api edit order

tristan_vu
Shopify Partner
1 0 0

Hello, 

 

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,

Tristan

Reply 1 (1)

SBD_
Shopify Staff
1831 273 421

Hey @tristan_vu 

 

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

Scott | Developer Advocate @ Shopify