ACP2E-5017: GraphQL customer role query fails for customers without a company

The ACP2E-5017 patch fixes the issue where the role field of the GraphQL customer query returns Internal server error for a customer who is not assigned to a company. This patch is available when the Quality Patches Tool (QPT) 1.1.84 is installed. The patch ID is ACP2E-5017. Please note that this issue is scheduled to be fixed in Adobe Commerce B2B 1.5.4.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) B2B 1.5.3

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) B2B 1.5.0 - 1.5.3
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

The role field of the GraphQL customer query returns Internal server error for a customer who is not assigned to a company.

Prerequisites:

B2B is installed.

Steps to reproduce:

  1. In the Admin, go to Stores > Settings > Configuration > General > B2B Features, set Enable Company to Yes, and click Save Config.
  2. Create a customer account that is not assigned to a company.
  3. Send the following GraphQL query using a valid customer token:
   query {
     customer {
       email
       firstname
       role {
         id
         name
       }
     }
   }

Expected results:

The query returns the customer data with the role set to null, without errors.

Actual results:

The query returns Internal server error.

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:

recommendation-more-help
commerce-operations-help-tools