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.

Issue with calculated line item quantity orderEditSetQuantity mutation

Issue with calculated line item quantity orderEditSetQuantity mutation

musfiqus
Visitor
1 0 0

I'm facing an issue, probably a bug on the Shopify end where if I send the following query to orderEditSetQuantity mutation, I get the old quantity in response which shouldn't be the case.

 

 

 

mutation editLineItemQuantity($id: ID!, $line_item_id: ID!, $quantity: Int!) {
	orderEditSetQuantity(
		id: $id
		lineItemId: $line_item_id
		quantity: $quantity
	) {
		calculatedOrder {
			id
			lineItems(first: 100) {
				edges {
					node {
						id
						title
						sku
						quantity
						editableQuantity
						editableQuantityBeforeChanges
						originalUnitPriceSet {
							presentmentMoney {
								amount
							}
						}
						variant {
							id
							product {
								id
							}
						}
					}
				}
			}
			addedLineItems(first: 100) {
				edges {
					node {
						id
						title
						sku
						quantity
						editableQuantity
						editableQuantityBeforeChanges
						originalUnitPriceSet {
							presentmentMoney {
								amount
							}
						}
						variant {
							id
							product {
								id
							}
						}
					}
				}
			}
			subtotalPriceSet {
				presentmentMoney {
					amount
				}
			}
			totalPriceSet {
				presentmentMoney {
					amount
				}
			}
			taxLines {
				priceSet {
					presentmentMoney {
						amount
					}
				}
			}
		}
		userErrors {
			field
			message
		}
	}
}

 

 

 

 

But, if I remove the following three properties from the query, then the query works and I get the updated quantity.

 

 

 

			subtotalPriceSet {
				presentmentMoney {
					amount
				}
			}
			totalPriceSet {
				presentmentMoney {
					amount
				}
			}
			taxLines {
				priceSet {
					presentmentMoney {
						amount
					}
				}
			}

 

 

 

Did anyone face a similar kind of issue? The API version used is 2021-10

Reply 1 (1)

awwdam
Shopify Staff
249 42 38

Hey @musfiqus, are you able to provide an x-request-id header value that was returned with the unexpected response, as well as the full response body? I can use these to take a closer look, locate logs on our end, and relay any insights or next steps back to your here - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog