A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am trying to use a Bulk Operation to fetch multiple connections from a product, but if the last connection in the query returns 0 results, the entire operation returns 0 results, even if the previous connections should be returning results. For example, if a product has metafields but is not in a collection, using this query inside of a bulk operation returns 0 results:
""" { product(id: "gid://shopify/Product/id") { metafields { edges { node { id } } } collections { edges { node { id } } } } } """
An example of this:
shop: jason-who-dev.myshopify.com
bulk operation id: gid://shopify/BulkOperation/4148494372
X-Request-ID : 5078b1c8-af3c-4f3d-b66f-2d90b41fd322
However, if you flop the ordering of the connections, this query returns the proper results
""" { product(id: "gid://shopify/Product/id") { collections { edges { node { id } } } metafields { edges { node { id } } } } } """
An example of this:
shop: jason-who-dev.myshopify.com
bulk operation id: gid://shopify/BulkOperation/4148756516
X-Request-ID : 74453573-6ec1-4cbf-b60c-c8b328647af6
Thanks,
Jason Freeman
https://pixelunion.net/
Thanks for the report Jason, I've passed it on to our Bulk Operations team who will take a look into it. I'll respond on your ticket with any updates.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thanks for the report Jason. This should be fixed now.
To learn more visit the Shopify Help Center or the Community Blog.