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.

Query run with bulk operation not respecting all of the quesries arguments

Query run with bulk operation not respecting all of the quesries arguments

AnonyScott
Shopify Partner
5 1 7

When I run the query as a stand alone I get the expect result where it returns the products with just one variant. If I run it via bulkOperationRunQuery it returns every variant of a product instead of just the first one.

 

Anyone have insights on why this is?

 

Also its odd to me that it returns the variants as separate entities not encapsulated in the product

 

mutation {
  bulkOperationRunQuery(query:"""
query {  
  products(query:"status:draft" ) 
  {
                edges {
                    node {
                        id                        
                        createdAt
                      	status
                        hasOnlyDefaultVariant
                        variants(first:1) {
                        	edges {
                            node {
                              sku
                            }
                          }
                      	}                        
                    }
                }
  }}
""")
  {
    bulkOperation {
      id
    }
  }
}
Replies 0 (0)