CheckoutAddMetadataForProductVariant

A mutation CheckoutAddMetadataForProductVariant permite adicionar metadados a um determinado produto vinculado a um carrinho.

mutation {
  checkoutAddMetadataForProductVariant(
    checkoutId: "d2753ea7-f46c-4e81-82cf-4bd3c5c408000000e"
    metadata: [{ key: "B", value: "1" }]
    productVariantId: 54321
  ) {
    checkoutId
    total
    products {
      ajustedPrice
      brand
      category
      url
      metadata {
        key
        value
      }
    }
    metadata {
      key
      value
    }
  }
}

Mostrar resposta
{
  "data": {
    "checkoutAddMetadataForProductVariant": {
      "checkoutId": "d2753ea7-f46c-4e81-82cf-4bd3c5c408000000e",
      "total": 9,
      "products": [
        {
          "ajustedPrice": 0,
          "brand": "Importado",
          "category": "Futebol Americano",
          "url": "https://lojacss.fbits.store/produto/12345",
          "metadata": [
            {
              "key": "B",
              "value": "1"
            }
          ]
        }
      ],
      "metadata": [
        {
          "key": "A",
          "value": "1"
        }
      ]
    }
  }
}