Shopify has rolled out a subtle yet powerful change to the GraphQL Admin API that directly affects how you handle order cancellations. Starting with the 2026-10 version, the orderCancel mutation now returns a structured jobResult field of type OrderCancelJobResult. This addition gives you granular insight into the cancellation process—status, errors, and the affected order—all in one place. In this post we’ll break down the change, explain who needs to pay attention, and walk you through the exact steps to update your integration.
What Changed
Previously, the orderCancel mutation only exposed a generic job object. While useful for tracking the background job ID, it didn’t surface cancellation‑specific details such as whether the operation succeeded, why it might have failed, or which order was impacted. The new jobResult field fills that gap. It returns an OrderCancelJobResult object that includes:
status – A clear enum (SUCCESS, FAILURE, PENDING) indicating the final state of the cancellation.errors – An array of OrderCancelUserError objects with error codes and messages.order – The Order object that was targeted, allowing you to confirm the order’s new state without an extra query.jobId – The original background job ID for backward compatibility.Who Is Affected?
orderCancel. If you rely on the mutation’s response to drive downstream logic, you’ll want to start reading jobResult instead of (or in addition to) the generic job field.job field will continue to work—Shopify has left the old field untouched—so there’s no immediate breakage. However, you’ll miss out on the richer data unless you adapt.How to Update Your Mutation
Replace your current mutation query with one that requests the new jobResult sub‑fields. Here’s a minimal example:
graphql
mutation CancelOrder($id: ID!) {
orderCancel(id: $id) {
jobResult {
status
errors {
code
message
}
order {
id
cancelReason
cancelledAt
}
jobId
}
# The old job field is still available if you need it
job {
id
}
}
}
In your JavaScript (or TypeScript) resolver, handle the response like so:
js
const response = await client.request(CANCEL_ORDER_MUTATION, { id: orderId });
const result = response.orderCancel.jobResult;
switch (result.status) {
case 'SUCCESS':
console.log('Order cancelled:', result.order.id);
break;
case 'FAILURE':
console.error('Cancellation failed:', result.errors);
break;
case 'PENDING':
console.log('Cancellation queued, job ID:', result.jobId);
break;
}
Migration Checklist
errors array gives you error codes like ORDER_ALREADY_CANCELLED or CANCEL_NOT_ALLOWED. Map these to user‑friendly messages.PENDING state and poll if necessary.job field in the query if you still rely on legacy job‑tracking dashboards.Testing & Validation
Use Shopify’s GraphQL Explorer or a local dev store to fire a test cancellation. Check that:
jobResult.status reflects the true outcome.jobResult.errors contains at least one entry with a descriptive message.order object shows the updated cancelledAt timestamp.If you see the generic job field but no jobResult, you’re still on a pre‑2026-10 version.
Why This Matters
Having a structured result eliminates guesswork. Instead of polling an external job endpoint or parsing ambiguous logs, you now get a deterministic response directly from the mutation. This speeds up order‑cancellation workflows, reduces support tickets, and lets you surface precise error messages to merchants and customers.
Ready to upgrade? Update your GraphQL queries, run the checklist above, and watch your cancellation experience become smoother for both developers and merchants.
