How can I calculate a refund using Shopify GraphQL (similar to refunds/calculate.json in REST)?

I’m currently working on migrating my application to use the Shopify GraphQL Admin API exclusively. I’ve been using the REST endpoint:

POST /admin/api/2025-04/orders/{order_id}/refunds/calculate.json

This allows me to calculate refund amounts (including discounts and taxes) without actually issuing the refund.

However, I’ve searched through the GraphQL Admin API documentation and couldn’t find any mutation or query that just calculates a refund without creating it.

  1. Is there a way to calculate refund amounts (with all the associated discounts and taxes) using GraphQL, similar to how refunds/calculate.json works in REST?
  2. If not, is this feature planned for GraphQL in the near future?

Hi @Udhaya ,

Shopify’s GraphQL Admin API does not currently support refund calculation previews (like refunds/calculate.json in REST). The only GraphQL mutation (refundCreate) actually issues a refund it can’t be used for previewing.

Continue using the REST endpoint:

POST /admin/api/2025-04/orders/{order_id}/refunds/calculate.json

Use this to preview refund amounts (taxes, discounts, shipping, etc.) without issuing the refund.

No refund preview feature in GraphQL yet — and Shopify has not officially announced plans to add it.

Use GraphQL for everything else, but call this one REST endpoint for refund previews. It’s fully supported to mix both in your app.

Thanks !