We are building API integrations for customers who use ShipHero. One of our workflows uses the orders
query to list orders with a given tag. Sometimes a tag can have a few hundred orders associated with it, so we have been using pagination with first/endCursor
/after
.
Sometimes, after grabbing all of the pages, our final result has a number of duplicated orders. The total number of results always seems to match the correct number of orders, but the ShipHero API is returning duplicates instead of the unique orders.
For example – if we are looking for orders tagged with tag-A
and there are 333, then we will receive 333 orders after exhausting the paginated results, but some of the results will be duplicates and we do not get data for all 333 orders.
I assume that the issue is that the sorting of these rows is changing behind the scenes – however, there does not seem to be a way for us to specify a sort order to try to keep things stable. Is there a way to reliably get all order results from pagination, or is there always a risk that reading all of the pages will not actually return all of the results? Is there actually a way to reliably get all of the orders for a given tag?
For completeness, here is a basic example of the query we are using:
query {
orders(tag: “tag-A”, updated_from: “2025-08-27”) {
data(first: 100) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
}
}
}
}
}
Our workaround has been to send the request with large limits (like 1000) but this causes issues with rate limits when the customer has other apps running.
Any suggestions for how we can solve this issue would be greatly appreciated. Our customers are not happy when we miss orders, and we are not sure how best to address this issue.