A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi , I am Awais and i am making order management app in with i have module of order editing i use "orderEditSetQuantity" mutation i have passed 4 parameters 1. calculatedOrderId 2. lineItemId (that's change quantity ) 3. quantity and 4. restock but i will get error of"Invilide id" can you please tell me the solution thanks
mutation orderEditSetQuantity($id: ID!, $lineItemId: ID!, $quantity: Int!) {
orderEditSetQuantity(id: $id, lineItemId: $lineItemId, quantity: $quantity) {
calculatedLineItem {
id
}
calculatedOrder {
id
}
userErrors {
field
message
}
}
}
{
"id": "gid://shopify/CalculatedOrder/3371335829",
"lineItemId": "gid://shopify/LineItem/5722631897237",
"quantity": 1,
"restock": true
}
Hey @Dev_Awais_ALi,
Double check that the id you're using is for the correct store, that error normally just means the id doesn't exist.
If you're still having trouble with it, please provide the X-Request-ID value from the response headers of the call, and we can use that to investigate further.
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@_JB Hello There, I am also having this issue with my GraphQL Requests for orderEditSetQuantity on the 2020-10 API:
x-request-id: 75a18a69-e583-40ef-96c6-d4f12e3333c3
Hi all!
I saw you are using wrong line item id.
You need to use calculated line item id for example gid://shopify/CalculatedLineItem/6390811525278
Hope this helps!