Hello!
We query the Shopify GraphQL API on behalf of many different clients, and we have noticed that for certain shops, bulk operations for Orders always time out when using both updated_at
and processed_at
filters at the same time in the query (using OR
).
Previously we were under the impression that this timeout only happens when the query we make would yield too big of a result, but that does not seem to be the case as it happens even when using a minimal query for a time period that has few/no orders at all.
Here is an example of such a query:
mutation {
bulkOperationRunQuery (query:"""
{
orders (query: "(processed_at:>=2012-01-24T00:00:00Z processed_at:<=2012-01-24T00:59:59Z) OR (updated_at:>=2012-01-24T00:00:00Z updated_at:<=2012-01-24T00:59:59Z)") {
edges {
node {
id
updatedAt
processedAt
}
}
}
}
""") {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
And the resulting timeout error, which we always get around 5 minutes after creating the bulk operation:
{
"data": {
"node": {
"id": "gid://shopify/BulkOperation/3612565307523",
"status": "FAILED",
"errorCode": "TIMEOUT",
"createdAt": "2025-06-04T07:39:45Z",
"completedAt": null,
"objectCount": "0",
"rootObjectCount": "0",
"fileSize": null,
"url": null,
"partialDataUrl": null
}
}
}
Making the same query with only updated_at
or processed_at
works perfectly fine, and the operation finishes pretty much instantaneously. It’s only when both are used that something seems to go very wrong.
I’ve looked through all relevant documentation on the subject, and have tried all recommended actions (adding a sortKey to the query, asking for a smaller interval, using less fields), but nothing seems to result in a successful operation.
As this query works perfectly fine for most of our clients, but consistently fails for others, I’m wondering if there’s any common denominator for the shops that it’s happening to. Does anyone know what could be going wrong here, or have any suggestions for workarounds? Any insights would be greatly appreciated!