Can I trust bulk operation line order?

Shopify Partner
2 0 1

I'm reading the documentation of bulk operation query


In the section of Download result data, there is a section that say that the order of each connection type is preserved


In the JSONL results, each product object is followed by each of its variant objects on a new line. The order of each connection type is preserved and all nested connections appear after their parents in the file.

then the section below have a note that say: avoid relying on a particular sequence of lines and object order


The GraphQL Admin API doesn't serially process the contents of the JSONL file. Avoid relying on a particular sequence of lines and object order to achieve a desired result.


I'm not sure if I can trust the order or not?

Reply 1 (1)

Shopify Staff
1415 231 484

Hi @roeiwag

The order of the connection types, means all of a product's variants should be listed under their parent product in the JSONL file, but those nested objects (the product's variants) may not be in the same order as how they appear in the merchant's admin, or in a products() query

Hope that helps.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog