What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Net orders by product

Net orders by product

matthewiiv
Visitor
1 0 0

I'm trying to get net orders for all active products from the admin API (sold - cancelled)

I've been able to achieve it by fetching 250 orders at a time and looping through the line items and refund line items but that is not at all scalable.

I can't use bulk operations on the graphql API because refunds aren't yet supported. 

Other than storing the orders and refunds in our own database, is there a scalable way of getting this information?

Any help would be greatly appreciated!

Replies 0 (0)