New Shopify Certification now available: Liquid Storefronts for Theme Developers

bulk operation not getting me correct data

tejasvyas
Shopify Partner
2 0 0

I am trying to perform the bulk operation to fetch the contextual prices. Here is the Query:

mutation {
  bulkOperationRunQuery(
   query"""
    {
      FiPrices: productVariants {
    edges {
      node {
        id
         contextualPricing(context: {country: FI}) {
            compareAtPrice{
                amount
                currencyCode
            }
            price{
                amount
                currencyCode
            }
            }
      }   
    }
  } 
    AuPrices: productVariants {
        edges {
          node {
            id
             contextualPricing(context: {country: AU}) {
                compareAtPrice{
                    amount
                    currencyCode
                }
                price{
                    amount
                    currencyCode
                }
                }
          }   
        }
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}
 
But Everytime, the record count is incorrect and different, I am trying to fetch contextual prices of multiple context which works in Graph QL but does not work with Bulk, try this and you can find that it works normally:


 
query
{
  FIproductVariants(first20) {
    edges {
      node {
        id
         contextualPricing(context: {countryFI}) {
            compareAtPrice{
                amount
                currencyCode
            }
            price{
                amount
                currencyCode
            }
            }
      }   
    }
  } 
USproductVariants(first20) {
    edges {
      node {
        id
         contextualPricing(context: {countryUS}) {
            compareAtPrice{
                amount
                currencyCode
            }
            price{
                amount
                currencyCode
            }
            }
      }   
    }
  }  
}
Replies 0 (0)