Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Why both cartItems[N].variant_sku and cartItems[N].data.sku are required? #349

Closed
@TomashKhamlai

Description

@TomashKhamlai

Steps to reproduce (*)

  1. Create Configurable Product with
    Name & SKU: conf
    Weight: 1
    Price: 1
    Variations:
  • sku: conf-white, qty: 12, price: 10
  • sku: conf-black, qty: 12, price: 10
  1. Perform GraphQL query:
mutation {
  addConfigurableProductsToCart(
    input: {
      cart_id: "gbK3g1pcEiyd39h2clKomLU6qsyFLAVT"
      cartItems: [
        {
          data: {
            qty: 1
            sku: "conf-black"
          }
        }
        {
          data: {
            qty: 1
            sku: "conf-white"
          }
        }
      ]
    }
  ) {
    cart {
      items {
        id
        qty
        product {
          name
          sku
        }
    }
  }
  }
}

Expected result (*)

  1. Isn't SKU unique value?

Actual result (*)

  1. No error and only one value is required

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions