I am missing the totalCount value from OrderLineItemConnection result.
This should be a paginated list result, but without the total count, we can’t use it that way.
Our workaround (for now) is to list the first 250 (the API max) elements of this OrderLineItem node list and show its lenght. With this solution we can’t manage carts and orders with more than 250 items.
I also post this in the public community.
Please add this totalCount field here and to all of the paginated list results.
It looks like the user Mikkynat, shared the correct answer here with you:
This is correct that the expected means of paginating on our GraphQL APIs is cursor based, and you can use the pageInfo.hasNextPage field to know when you need to continue paginating for more results in order to work with queries returning over 250 resources.
More info on GraphQL pagination can be found in our Shopify.dev docs here:
I will also be submitting some feedback internally on your behalf that you’d like to see the totalCount added for the OrderLineItemConnection connector field as well, and you can also submit feedback via the Shopify.dev page by scrolling to the bottom and selecting Was this section helpful? No and entering your feedback.