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
{
FI: productVariants(first: 20) {
edges {
node {
id
contextualPricing(context: {country: FI}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
US: productVariants(first: 20) {
edges {
node {
id
contextualPricing(context: {country: US}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
}