path CancelOrderResponse.*CancelOrderResponse!CancelOrderResponse object.12345{ "input": { "orderId": "orderId-123-456-789" } }
123456789101112mutation ($input: CancelOrderInput!) { cancelOrder(input:$input){ result { ... on CancelAmazonOrderResult { items { amazonOrderId, status, failReason } } ... on CancelShopifyOrderResult { status } } error { message code } } }
12345678910111213141516{ "data": { "cancelOrder": { "result": { "items": [ { "amazonOrderId": "111-9474033-3741041", "status": "CANCEL_PROCESSING", "failReason": null } ] }, "error": null } } }
CANCEL_FAILED the payload would look like below:12345678910111213141516{ "data": { "cancelOrder": { "result": { "items": [ { "amazonOrderId": "111-9474033-3741041", "status": "CANCEL_FAILED", "failReason": "Error attempting to request cancellation" } ] }, "error": null } } }
1234567891011{ "data": { "cancelOrder": { "result": [], "error": { "message": "There was a problem cancelling this order. Contact Rye to cancel the order manually.", "code": "REQUEST_MANUAL_CANCELLATION" }, } } }