Bulk Operation broken when the last connection returns 0 results

Highlighted
Shopify Partner
1 0 0

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/

0 Likes
Highlighted
Shopify Staff
Shopify Staff
486 42 106

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.

Developer Experience @ Shopify
0 Likes
Highlighted
Shopify Staff
Shopify Staff
16 3 10

Thanks for the report Jason. This should be fixed now.

1 Like