MDVA-44147: GraphQL request doesn't return Requisition Lists
GraphQL request doesn't return Requisition Lists. Quality patch MDVA-44147 for magento/module-requisition-list-graph-ql applies to Magento Open Source and Adobe Commerce 2.4.2 to 2.4.4-p18.
- Categories
- GraphQL
- Components
- magento/module-requisition-list-graph-ql
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.14
Issue
GraphQL request doesn't return Requisition Lists.
Steps to reproduce
1. Go to Store > Settings > Configuration > General > B2B Features and enable Requisition List. 1. Log in as a customer and add a product to the Requisition List. 1. Create a Customer Token. <pre> <code class="language-graphql"> mutation { generateCustomerToken( email: "test@gmail.com" password: "xxxxxxxx" ) { token } } </code> </pre> 1. Use the following query to retrieve all the Requisition Lists from the customer. Use the Authorization header with the value Bearer <customer_token>. Refer to the Customer Query article in our developer documentation for more information. Request: <pre> <code class="language-graphql"> query { customer { requisition_lists( pageSize: 20 ) { items { uid name description items(pageSize: 20) { items { uid product { uid name sku __typename } quantity } total_pages } } total_count } } } </code> </pre> Response: <pre> <code class="language-graphql"> { "data": { "customer": { "requisition_lists": { "items": [ { "uid": "MQ==", "name": "Name", "description": "Description", "items": { "items": [ { "uid": "MQ==", "product": { "uid": "MQ==", "name": "Simple 01", "sku": "s00001", "__typename": "SimpleProduct" }, "quantity": 1 } ], "total_pages": 1 } } ], "total_count": 1 } } } } </code> </pre> 1. Copy the UID of any item from the list returned (MQ==) and use the following query to get the list filtered by the UID. <pre> <code class="language-graphql"> query { customer { requisition_lists( pageSize: 20, filter: { uids: { eq: "MQ==" } } ) { items { uid name description items(pageSize: 20) { items { uid product { uid name sku __typename } quantity } total_pages } } total_count } } } </code> </pre>
Adobe's page lists 2.4.2 - 2.4.4 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.5.
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 MDVA-44147. On Cloud, add MDVA-44147 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-44147/ 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-b2b-base >=1.3.1 <1.3.4
- Magento Open Source
- —
- vendor/magento/module-requisition-list-graph-ql/Model/RequisitionList/GetRequisitionList.php
