ACSD-45817: GraphQL products mutation gives all configurable variants

The ACSD-45817 patch fixes the issue where a GraphQL products mutation for a specific store returns all configurable variants, including those not assigned to the requested store. This patch is available when the Quality Patches Tool (QPT) 1.1.18 is installed. The patch ID is ACSD-45817. Please note that the issue was fixed in Adobe Commerce 2.4.4.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.3-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.2 - 2.4.3-p3
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

A GraphQL products mutation for a specific store returns all configurable variants, including those not assigned to the requested store.

Prerequisites:

Create a 2nd website, 2nd store, and a 2nd store view.

Steps to reproduce:

  1. Create a configurable product with two subproducts: “configurable-a” and “configurable-b”.

  2. Assign the configurable product to both websites.

  3. Assign only one “configurable-a” variation to the 2nd website.

  4. Go to the Storefront, switch to the 2nd website, and open the configurable product.

  5. Make sure you see only one child option: “configurable-a”.

  6. Run a GraphQL query using POST: /graphql endpoint, and Headers: "store" = "new"

    code language-graphql
    {
      products(filter: { sku: { eq: "configurable" } }) {
        items {
          id
          attribute_set_id
          name
          sku
          __typename
          price_range{
            minimum_price{
              regular_price{
                value
                currency
              }
            }
          }
          categories {
            id
          }
          ... on ConfigurableProduct {
            configurable_options {
              id
              attribute_id_v2
              label
              position
              use_default
              attribute_code
              values {
                value_index
                label
              }
              product_id
            }
            variants {
              product {
                id
                name
                sku
                attribute_set_id
                ... on PhysicalProductInterface {
                  weight
                }
                price_range{
                  minimum_price{
                    regular_price{
                      value
                      currency
                    }
                  }
                }
              }
              attributes {
                uid
                label
                code
                value_index
              }
            }
          }
        }
      }
    }
    

Expected results:

The “configurable-b” variation is not assigned to the 2nd website and should not be displayed in the response.

Actual results:

The “configurable-b” variation is displayed in the response.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a