How to cancel order with GraphQL API?

Highlighted
Shopify Partner
26 0 2

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?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
7 2 2

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/.

0 Likes
Highlighted
Shopify Partner
26 0 2
I’m guessing there are plans to implement cancel, but date TBD?
0 Likes
Highlighted
Shopify Staff
Shopify Staff
7 2 2

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.

0 Likes
Shopify Partner
26 0 2

Is this available yet in the GraphQL API?

0 Likes