Product variant translation is incomplete using bulk operations

varrodani
Shopify Partner
1 0 0

Hi.
I noticed that if I query the variants of the products using the bulk operation, the corresponding translation values are not the same as the GraphQL response. The title field is missing.

 

My bulk operation query:

mutation {
  bulkOperationRunQuery(
    query: """
        {
      products (query: "status:active") {
        edges {
          node {
            id
            title
            createdAt
            tracksInventory
            hasOnlyDefaultVariant
            description
            handle
            productType
            tracksInventory
            tags
            vendor
            totalInventory
            featuredImage {
              url
              id
            }
            variants {
              edges {
                node {
                  id
                  sku
                  price
                  compareAtPrice
                  barcode
                  inventoryQuantity
                  inventoryPolicy
                  selectedOptions {
                    key: name
                    value
                  }
                  image {
                    url
                    id
                  }
                  translations(locale: "hu") {
                    key
                    value
                    locale
                  }
                }
              }
            }
          }
        }
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

The response to a product variant with bulk request:

{
  "id": "gid://shopify/ProductVariant/43718416990438",
  "title": "OS / black",
  "sku": "AD-03-black-OS",
  "price": "70.00",
  "compare_at_price": null,
  "barcode": null,
  "inventory_quantity": 7,
  "inventory_policy": "DENY",
  "options": [
    {
      "name": "Size",
      "value": "OS"
    },
    {
      "name": "Color",
      "value": "black"
    }
  ],
  "image": null,
  "translations": [
    {
      "key": "option2",
      "value": "fekete",
      "locale": "hu"
    }
  ],
  "__parentId": "gid://shopify/Product/8177258037478"
}

My GraphQL for one product:

{
  product(id: "gid://shopify/Product/8177258037478") {
    id
    title
    createdAt
    tracksInventory
    hasOnlyDefaultVariant
    body_html: description
    handle
    productType
    tracksInventory
    tags
    vendor
    totalInventory
    featuredImage {
      url
      id
    }
    variants(first: 10) {
      edges {
        node {
          id
          sku
          title
          price
          compareAtPrice
          barcode
          inventory_quantity: inventoryQuantity
          inventory_policy: inventoryPolicy
          selectedOptions {
            name
            value
          }
          image {
            url
            id
          }
          translations(locale: "hu") {
            key
            value
            locale
          }
        }
      }
    }
  }
}

 

The response to a product variant with GraphQL:

{
    "data": {
        "product": {
            "id": "gid://shopify/Product/8177258037478",
            "title": "ADIDAS | CLASSIC BACKPACK",
            "createdAt": "2023-03-28T14:52:35Z",
            "tracksInventory": true,
            "hasOnlyDefaultVariant": false,
            "body_html": "This women's backpack has a glam look, thanks to a faux-leather build with an allover fur print. The front zip pocket keeps small things within reach, while an interior divider reins in potential chaos.",
            "handle": "adidas-classic-backpack",
            "productType": "ACCESSORIES",
            "tags": [
                "adidas",
                "backpack",
                "egnition-sample-data"
            ],
            "vendor": "ADIDAS",
            "totalInventory": 7,
            "featuredImage": {
                "url": "https://cdn.shopify.com/s/files/1/0661/7015/9334/products/85cc58608bf138a50036bcfe86a3a362.jpg?v=1680015155",
                "id": "gid://shopify/ProductImage/39334821527782"
            },
            "variants": {
                "edges": [
                    {
                        "node": {
                            "id": "gid://shopify/ProductVariant/43718416990438",
                            "sku": "AD-03-black-OS",
                            "title": "OS / black",
                            "price": "70.00",
                            "compareAtPrice": null,
                            "barcode": null,
                            "inventory_quantity": 7,
                            "inventory_policy": "DENY",
                            "selectedOptions": [
                                {
                                    "name": "Size",
                                    "value": "OS"
                                },
                                {
                                    "name": "Color",
                                    "value": "black"
                                }
                            ],
                            "image": null,
                            "hu": [
                                {
                                    "key": "option2",
                                    "value": "fekete",
                                    "locale": "hu"
                                },
                                {
                                    "key": "title",
                                    "value": "OS / fekete",
                                    "locale": "hu"
                                }
                            ]
                        }
                    },
                    {
                        "node": {
                            "id": "gid://shopify/ProductVariant/43861375549670",
                            "sku": "",
                            "title": "OS / green",
                            "price": "70.00",
                            "compareAtPrice": null,
                            "barcode": "",
                            "inventory_quantity": 0,
                            "inventory_policy": "DENY",
                            "selectedOptions": [
                                {
                                    "name": "Size",
                                    "value": "OS"
                                },
                                {
                                    "name": "Color",
                                    "value": "green"
                                }
                            ],
                            "image": null,
                            "hu": [
                                {
                                    "key": "option2",
                                    "value": "zöld",
                                    "locale": "hu"
                                },
                                {
                                    "key": "title",
                                    "value": "OS / zöld",
                                    "locale": "hu"
                                }
                            ]
                        }
                    }
                ]
            },
            "collections": {
                "edges": [
                    {
                        "node": {
                            "id": "gid://shopify/Collection/414458904806",
                            "title": "ADIDAS",
                            "description": "Adidas collection",
                            "image": {
                                "url": "https://cdn.shopify.com/s/files/1/0661/7015/9334/collections/97a3b1227876bf099d279fd38290e567.jpg?v=1680015217",
                                "id": "gid://shopify/CollectionImage/1686760128742"
                            },
                            "handle": "adidas"
                        }
                    }
                ]
            }
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 66,
            "actualQueryCost": 16,
            "throttleStatus": {
                "maximumAvailable": 1000.0,
                "currentlyAvailable": 984,
                "restoreRate": 50.0
            }
        }
    }
}

Can you tell me why the two answers are not the same? Perhaps a fix for this problem is expected in the near future?

Replies 0 (0)