mutation
mutation returnLineItemRemoveFromReturn($returnId: ID!, $returnLineItems: [ReturnLineItemRemoveFromReturnInput!]!) {
returnLineItemRemoveFromReturn(returnId: $returnId, returnLineItems: $returnLineItems) {
return {
id
}
userErrors {
field
message
}
}
}
variables
{
"returnId": "gid://shopify/Return/10268868783",
"returnLineItems": [
{
"quantity": 1,
"returnLineItemId": "gid://shopify/ReturnLineItem/15804956847"
}
]
}
I’m receiving this error:
"data": {
"returnLineItemRemoveFromReturn": {
"return": null,
"userErrors": [
{
"field": [
"returnLineItems",
"0",
"quantity"
],
"message": "Return line item has an invalid quantity."
}
]
}
},
I’m not sure how quantity of 1 is invalid.
I’m sure that the ReturnLineItem ID is valid and has a quantity of 1. If I spy on the Network tab in chrome dev tools when I open up the return request in the Shopify admin, there are two items in my return request. One of them matches what I have in my variables above.
I basically copied and pasted from this official Shopify tutorial: https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management#step-6-optional-remove-return-line-items-from-the-return
