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

Topic summary

A user is experiencing inconsistent behavior when querying Shopify products with variants using the Bulk Operations API.

The Issue:

  • When running a standalone query with variants(first:1), it correctly returns products with only one variant
  • When the same query runs through bulkOperationRunQuery, it returns all variants for each product instead of respecting the first:1 argument

Additional Observations:

  • The bulk operation returns variants as separate entities rather than nested within their parent products
  • The query targets draft products and includes fields like hasOnlyDefaultVariant, status, and createdAt

Current Status:
The user is seeking insights into why the bulk operation doesn’t respect the query arguments that work correctly in standalone execution. No resolution or explanation has been provided yet.

Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

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
    }
  }
}