How to cancel order with GraphQL API?

kishinmanglani
Shopify Partner
26 0 11

Is it possible to cancel orders with the GraphQL API yet? Or is it better to use the refundCreate mutation and refund the order that way? Would that basically cancel the order?

Replies 15 (15)
chrisbutcher
Shopify Staff
Shopify Staff
7 2 3

Hello @kishinmanglani ,

 

You are correct, the GraphQL Admin API don't yet have an `orderCancel` mutation available.

 

For now, you can use refundCreate to refund the money but note that it wouldn't have the same effects as cancelling the order using the REST Admin API. For example, if you just refund an order the orders/cancelled webhooks won't be sent to apps, merchants will not see the order as cancelled in Shopify Admin, the customer will not receive an Order Cancelled email.

 

For now, we recommend you cancel orders using the REST Admin API: https://help.shopify.com/en/api/reference/orders/order#cancel-2019-10/.

kishinmanglani
Shopify Partner
26 0 11
I’m guessing there are plans to implement cancel, but date TBD?
chrisbutcher
Shopify Staff
Shopify Staff
7 2 3

That's correct @kishinmanglani. We don't have an exact timeline that I can provide with you now, but we are aware it's an example of some missing parity between the REST and GraphQL API. From what I can tell, this feature should be able in GraphQL in the coming months.

kishinmanglani
Shopify Partner
26 0 11

Is this available yet in the GraphQL API?

dylanpierce
Shopify Partner
160 3 68

Thanks for clarifying that this functionality is only available on the RESTful API. I was digging through the GraphQL API and not finding this mutation was very confusing.

Is there an update on when to expect this to be included?

Founder of Verdict - Anti-Fraud Apps for Shopify
  • Blockade - Easily block countries, IP addresses, VPNs
  • Real ID - Verify your customer's real IDs easily & securely
lthomas1
Tourist
15 0 2

Is this implemented on graphql api ?

Xardas
Tourist
7 0 4

I'm also interested in the orderCancel GraphQL mutation,

Looks like it's still does not exist

faouzi
New Member
1 0 0

Thanks for clarification @chrisbutcher ,
is this functionality will be soon implemented? could refundCreate imutate the same functionality expect email notification ?


jig_r
Shopify Partner
26 1 6

Are there any updates to the order cancellation capability via the GraphQL API?

It seems a bit silly that everything else is available to do with order via REST, but you can't cancel using GraphQL. 

Its been about a year since this was first raised.

prakalp
New Member
2 0 2
An Updates on this thread?
jig_r
Shopify Partner
26 1 6

I've created a small Rails app to handle this for me, forwarding the requests from my app, to the rails app, to shopify admin api

tolgapaksoy
Shopify Partner
91 7 55

I cannot believe this isn't supported in Graphql. Just to cancel an Order, I need to setup additional logic for a REST client... Very strange, Shopify

superprat
Shopify Partner
1 0 1

Checking in 2022.

 

Doesn't seem like the cancel order mutation has been put in yet. If anyone has an update to let us know!

GaryOfAntioch
Shopify Partner
1 0 0

Hi @chrisbutcher,

 

Would you happen to have any update on this?
- tia

dropkick
Shopify Partner
2 0 1

Is this available yet?