Looking Up Refunds in GraphQL

Excursionist
78 0 9

Is there a way I can query all refunds during a date range via the GraphQL API? I know I can query orders and hope that the updated_at column relates to the refund, but there could be a chance an order was updated after the refund processed and thus I'm not really searching the refund window, but rather any order changes.

 

It seems kind of crazy that there is no way to filter orders by when refunds happened, but also no way to look up refunds separately from orders. Is there a way to tie a TenderTransaction back to the order associated with it? I'm not seeing any related order identifiers on that object type.

0 Likes
Shopify Staff
Shopify Staff
1007 66 132

Hey @MrPunkin , 

 

The TenderTransaction resource does provide the order_id that the transaction is associated to, but it looks like that is only returned with the REST endpoint for some reason. I'll log an issue to see if we can get that added to GraphQL as well, that seems like an oversight. 

0 Likes
Excursionist
78 0 9

Josh,

 

That'd be excellent, thank you. It does seem like an oversight to me as well. I'd love to transition to the GraphQL endpoint for this data but without parity between the two endpoints it's not possible just yet.

0 Likes
Shopify Staff
Shopify Staff
1007 66 132

Hey again @MrPunkin , 

 

Great news! We're going to push out a change to add the order ID to tender transactions in GraphQL. Provided there aren't any major issues, it should be ready to go by the end of the day - but if you don't see the change by then, things should be ready for Monday. 

0 Likes
Excursionist
78 0 9

That's great news, thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1007 66 132

Hey again @MrPunkin , 

 

Apologies, looks like my time estimate was off by a day - this code change should be shipping out within the next few hours provided no major issues arise. Keep your eyes peeled!

0 Likes