Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Can I trust bulk operation line order?

Can I trust bulk operation line order?

roeiwag
Shopify Partner
2 0 1

I'm reading the documentation of bulk operation query https://shopify.dev/api/usage/bulk-operations/queries

 

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)

ShopifyDevSup
Shopify Staff
1453 238 527

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 Shopify.dev or the Shopify Web Design and Development Blog