{"data":{"id":"MDVA-37748","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where a GraphQL query returns products not assigned to a shared catalog.","categories":["B2B","GraphQL"],"components":["app/code","magento/module-catalog-permissions-graph-ql","magento/module-customer-segment","magento/module-shared-catalog-graph-ql"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-5/mdva-37748-graphql-query-returns-products-not-assigned-to-shared-catalog","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-5/mdva-37748-graphql-query-returns-products-not-assigned-to-shared-catalog.md","blobSha":"b4b26eb8a0f54b71b28eb0f6547696ddb8675ea5","description":"GraphQL query returns products not assigned to a shared catalog.","stepsToReproduce":"1. Create two products and assign them to a category: * Product 1 - Public * Product 2 1. Assign \"Product 1 - Public\" to the \"Default (General)\" shared catalog. 1. Create an additional custom shared catalog and assign it to \"Product 2.\" 1. Create a new company and assign it to the additional shared catalog created in step three. 1. After cron execution/reindex, on the frontend, validate that you can see \"Product 1 - Public\" if you are not logged in. 1. Log in as the admin of the company created in step four, and validate that you only see \"Product 2.\" 1. Request an Authorization Token using the following GraphQL query: mutation { generateCustomerToken( email: \"company.admin@exapmle.test\" password: \"password\" ) { token } } 1. Add header Authorization Bearer value-of-the-token and execute the following GraphQL query: { products( filter: {}, pageSize: 100, currentPage: 1 sort: {} ) { total_count page_info { page_size current_page } aggregations { attribute_code count label options { label value count } } items { name sku created_at updated_at stock_status description {html} short_description {html} url_key url_path price_tiers{ final_price{ value currency } discount{ amount_off percent_off } quantity } price_range { maximum_price { regular_price { value } final_price { value } } minimum_price { regular_price { value } final_price { value } } } image { url } thumbnail { url } small_image { url } media_gallery { url } ... on ConfigurableProduct { configurable_options { id label position use_default attribute_code values { value_index label swatch_data { value } } product_id } variants { product { id name sku #margin #margin_percentage image { url } small_image { url } thumbnail { url } media_gallery{ url } attribute_set_id ... on PhysicalProductInterface { weight } price_range { minimum_price { regular_price { value currency } } } } attributes { label code value_index } } } } } }","introducedInQpt":"1.1.5","createdFor":["2.4.2"],"documentedRange":"2.4.2 - 2.4.2-p2","scheduledFixRelease":"2.4.4"},"files":[{"package":"magento/magento2-ee-base","constraint":">=2.4.2 <2.4.3","path":"patches/commerce/MDVA-37748_2.4.2_v3.patch","blobSha":"e40fe5755ed4ecaa036e1bda06ec939d1576ce4e","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/commerce/MDVA-37748_2.4.2_v3.patch","thirdParty":false,"modifies":[{"path":"app/code/Magento/BannerGraphQl/Model/DynamicBlockFormatter.php","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/Model/DynamicBlocks.php","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/Model/Resolver/DynamicBlocks.php","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/Plugin/Block/Widget/Banner.php","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/README.md","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/composer.json","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/etc/graphql/di.xml","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/etc/module.xml","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/etc/schema.graphqls","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/etc/widget.xml","change":"added","package":"magento/module-banner-graph-ql"},{"path":"app/code/Magento/BannerGraphQl/registration.php","change":"added","package":"magento/module-banner-graph-ql"},{"path":"vendor/magento/module-catalog-permissions-graph-ql/Model/Customer/GroupProcessor.php","change":"modified","package":"magento/module-catalog-permissions-graph-ql"},{"path":"vendor/magento/module-catalog-permissions-graph-ql/Plugin/CatalogGraphQl/ProductSearchCriteriaFilter.php","change":"added","package":"magento/module-catalog-permissions-graph-ql"},{"path":"vendor/magento/module-catalog-permissions-graph-ql/etc/di.xml","change":"modified","package":"magento/module-catalog-permissions-graph-ql"},{"path":"vendor/magento/module-catalog-permissions-graph-ql/etc/search_request.xml","change":"added","package":"magento/module-catalog-permissions-graph-ql"},{"path":"vendor/magento/module-customer-segment/Model/CustomerSegmentsProvider.php","change":"added","package":"magento/module-customer-segment"}],"packages":["magento/module-banner-graph-ql","magento/module-catalog-permissions-graph-ql","magento/module-customer-segment"],"hasTests":false,"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.2-p2","2.4.2-p1","2.4.2"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false},{"package":"magento/magento2-b2b-base","constraint":">=1.3.1 <1.3.2","path":"patches/commerce/MDVA-37748_1.3.1_v3.patch","blobSha":"df39ed0d7311720f09b05663156cd5a11b615f6f","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/commerce/MDVA-37748_1.3.1_v3.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-shared-catalog-graph-ql/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/ApplyCategoryPermissionsOnProductProcessor.php","change":"added","package":"magento/module-shared-catalog-graph-ql"},{"path":"vendor/magento/module-shared-catalog-graph-ql/etc/di.xml","change":"added","package":"magento/module-shared-catalog-graph-ql"},{"path":"vendor/magento/module-shared-catalog-graph-ql/etc/module.xml","change":"modified","package":"magento/module-shared-catalog-graph-ql"}],"packages":["magento/module-shared-catalog-graph-ql"],"hasTests":false,"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.2-p2","2.4.2-p1","2.4.2"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.2-p2","2.4.2-p1","2.4.2"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch MDVA-37748 details"}