Bulk Operation Error when too much agreements

Hi !

I’m trying to query the sales of a shop via bulk operation but I get an internal server error probably because the number of objects is too important.

Here is the query :

bulkOperationRunQuery(
query:“{orders(query:“updated_at:>=‘2026-01-26T14:35:47.074Z’ AND updated_at:<‘2026-01-26T14:35:57.000Z’”,sortKey:UPDATED_AT){edges{node{id agreements{edges{node{id happenedAt reason…on ReturnAgreement{return{id}}sales{edges{node{id actionType lineType quantity…on ProductSale{lineItem{id}}}}}}}}}}}}”
) {
bulkOperation {
id
errorCode
},
userErrors {
code
field
message
}
}

As you see, I’m only querying the data for 1 minute, but I can’t make it work with the bulk operation. I have a fallback mecanism on classic graphql queries for which I’m forced to use pagination, which defeats the whole point of using the bulk operation API, and it looks like this problem has been going on for a long time and has been reported several times, do we have any updates on this?
And is there anything I could do on my side to prevent this?
This order has 120 elements in the “sales” attribute.

Hey @Noe_Morvillers! The problem is that the SalesAgreement interface doesn’t implement Node, which is a requirement for bulk operation connections. It may work for orders with low cardinality, but once the agreements or nested sales connection needs to paginate (like your order with 120 sales), it fails.

Unfortunately there’s no fix on your side - the only workaround is falling back to regular paginated queries when bulk operations fail on specific orders which I know that defeats the purpose.

There’s been feedback from the community asking for SalesAgreement to implement Node. I’ll raise this thread with the relevant team again to add another data point, but I can’t promise any timeline on when or if that would happen. I’ll update here if I hear anything back - thanks for raising this again!