SUMMARY
- Where is the “total_line_items_price” field in GraphQL that is available in REST?
- In the GraphQL > Orders query, are there other fields that we can use to be an exact match of REST’s total_line_items_price?
- In the GraphQL > single-order query, is totalLineItemsPriceSet an exact match to total_line_items_price?
DETAILS
My Team and I are migrating REST API implementations over to GraphQL. We are currently leveraging version 2024-07 for both.
There are quite a few fields we are not able to track down that seem to be missing from GraphQL. Furthermore, there is very little documentation for many of the fields in question.
One of the most important fields that we need from the REST version is “total_line_items_price”. We need an exact-match counterpart in GraphQL. Although there are various other fields (e.g. totalPriceSet, subTotalPriceSet, etc.)… they all do not match exact values for total_line_items_price due to factors such as discounts, tax, shipping, etc.
The best I was able to come up with was to aggregate lineItems.originalTotalSet.shopMoney.amount. The only issue is that my Team has decided not to perform calculations in our code, since it would be best to pull directly from the response.
As an aside… it looks like totalLineItemsPriceSet in the single-order query matches that of REST’s total_line_items_price. Can someone please confirm if this is true? Even if this is a true match, my Team and I would like to gather our information from the Orders query if possible, since this is what most of our code leverages already.