Hello, I ran into a problem when changing the quantity in the LineItem
Changes are committed in CalculatedOrder and calculatedLineItem, but orderEditCommit returns
“message”: “Could not save the order edit.”
Sequencing:
Request:
mutation beginEdit{
orderEditBegin(id: "gid://shopify/Order/4186412679357"){
calculatedOrder{
id
lineItems(first: 1) {
edges {
node {
id
}
}
}
}
}
}
Response:
{
"data": {
"orderEditBegin": {
"calculatedOrder": {
"id": "gid://shopify/CalculatedOrder/21163114685",
"lineItems": {
"edges": [
{
"node": {
"id": "gid://shopify/CalculatedLineItem/10653585375421"
}
}
]
}
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 13,
"actualQueryCost": 13,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 987,
"restoreRate": 50.0
}
}
}
}
Request:
mutation orderEditSetQuantity($id: ID!, $lineItemId: ID!, $quantity: Int!) {
orderEditSetQuantity(id: $id, lineItemId: $lineItemId, quantity: $quantity) {
userErrors {
field
message
}
calculatedLineItem {
id
quantity
}
calculatedOrder {
id
}
}
}
Response:
{
"data": {
"orderEditSetQuantity": {
"userErrors": [],
"calculatedLineItem": {
"id": "gid://shopify/CalculatedLineItem/10653585375421",
"quantity": 3
},
"calculatedOrder": {
"id": "gid://shopify/CalculatedOrder/21163114685"
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 990,
"restoreRate": 50.0
}
}
}
}
Request:
mutation orderEditCommit($id: ID!) {
orderEditCommit(id: $id) {
userErrors {
field
message
}
order {
id
}
}
}
Response:
{
"data": {
"orderEditCommit": {
"userErrors": [
{
"field": [
"id"
],
"message": "Could not save the order edit."
}
],
"order": null
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 990,
"restoreRate": 50.0
}
}
}
}
My Variables:
{
"id": "gid://shopify/CalculatedOrder/21163114685",
"lineItemId": "gid://shopify/CalculatedLineItem/10653585375421",
"quantity": 2
}
Please tell me where I went wrong.