GraphQL query to hide categories not work with B2B shared catalog
Affected products and versions
- Adobe Commerce on cloud infrastructure and Adobe Commerce on-premises 2.4.3
GraphQL categories and
categoryList queries ignore the category permission to hide categories in a shared catalog. This happens to all merchants on Adobe Commerce 2.4.3 with B2B Shared Catalog feature turned on.
Steps to reproduce:
This happens to all merchants on Adobe Commerce 2.4.3 with PWA storefront consuming GraphQL API with Adobe Commerce backend/Admin having B2B Shared Catalog feature turned on.
- Create multiple categories (CAT1,CAT2).
- Create a private shared catalog.
- Create a company user and assign it to the above shared catalog.
- Assign a few products to each of these categories.
- Assign CAT1 to the custom catalog, unassign CAT2 from the custom private catalog. This unassigns all products from CAT2 from the shared catalog.
- Save the custom catalog.
- Set the category permission for CAT2 to Deny Browsing category and set the customer group to the above private catalog.
- Run the
categoryList query or the categories query as the company user from step three.
Only the CAT1 shows up in the results.
All the categories show up regardless of whether they are assigned/unassigned in the shared catalog or what the category permissions are.
Functionality was not implemented.
The issue is going to be fixed in the scope of version 2.4.4, and merchants should submit a ticket to get a custom patch if they need a solution prior to the 2.4.4 release.