ACSD-51305: Out-of-stock composite child products are not available in the GraphQL response
Out-of-stock composite child products are not available in the GraphQL response. Quality patch ACSD-51305 for magento/module-catalog-graph-ql applies to Magento Open Source and Adobe Commerce 2.4.6 to 2.4.6-p15.
- Categories
- Catalog/Product, GraphQL
- Components
- magento/module-catalog-graph-ql, magento/module-related-product-graph-ql, magento/module-catalog-staging, magento/module-catalog-staging-graph-ql
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.32
Issue
Out-of-stock composite child products are not available in the GraphQL response.
Steps to reproduce
1. Log in to the Admin website. 1. Create a category (cat1, id=3). 1. Create a simple1 product (out of stock, not visible individually, assigned to cat1). 1. Create a simple2 product (in stock, not visible individually, assigned to cat1). 1. Create a bundle1 product with simple1 and simple2 child products as radio-button option1 products and assign it to the cat1 category. 1. Go to Admin > System > Configuration > Catalog > Inventory. * Set Display Out of Stock Products to Yes. 1. Open the bundle1 product on the storefront, and ensure that both simple1 and simple2 child products are displayed inside it. 1. Run the following GraphQL query: { categoryList(filters: { ids: { in: ["3"] } }) { id name products(pageSize: 8, sort: { position: ASC }) { total_count items { id sku name ... on BundleProduct { url_key items { title sku options { quantity position is_default product { id name sku } } } } } } } }
Adobe's page lists 2.4.6 - 2.4.6-p1 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.7.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-51305. On Cloud, add ACSD-51305 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-51305/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.6 <2.4.7
- Magento Open Source
- 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
- Adobe Commerce
- 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
- Patch file
- patches/os/ACSD-51305_2.4.6.patch
- vendor/magento/module-catalog-graph-ql/Model/Resolver/Products/DataProvider/Product.php
- vendor/magento/module-related-product-graph-ql/Model/Resolver/Batch/AbstractLikedProducts.php
magento/magento2-ee-base >=2.4.6 <2.4.7
- Magento Open Source
- —
- Adobe Commerce
- 2.4.6-p15, 2.4.6-p14, 2.4.6-p13, 2.4.6-p12, 2.4.6-p11, 2.4.6-p10, 2.4.6-p9, 2.4.6-p8, 2.4.6-p7, 2.4.6-p6, 2.4.6-p5, 2.4.6-p4, 2.4.6-p3, 2.4.6-p2, 2.4.6-p1, 2.4.6
- Patch file
- patches/commerce/ACSD-51305_2.4.6.patch
- vendor/magento/module-catalog-staging/Model/Indexer/Category/Product/Preview.php
- vendor/magento/module-catalog-staging-graph-ql/Model/Plugin/ProductsPreviewReindexPlugin.php (added)
- vendor/magento/module-catalog-staging-graph-ql/etc/graphql/di.xml
