ACSD-60326: GraphQL query on customer Returns status gives an error
The ACSD-60326 patch fixes the issue where an error occurs in the GraphQL query for customer Returns status. This patch is available when the Quality Patches Tool (QPT) 1.1.51 is installed. The patch ID is ACSD-60326. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.8.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.6-p2
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p2
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
GraphQL query on customer Returns status gives an error.
Steps to reproduce:
-
Initialize a fresh instance with sample data.
-
On the Admin sidebar, go to Stores > Settings > Configuration > Sales > RMA Settings and set Enable RMA on Storefront to Yes.
-
Go to Sales > Shipping Settings > Origin and fill out the address.
-
Change the password for the customer
roni_cost@example.com
. -
Log in to the admin panel and place an order for the customer
roni_cost@example.com
with the following products:- WSH12-32-Red
- WSH12-32-Purple
- WSH12-32-Green
-
Create an Invoice and Shipment for this order.
-
Select Create Returns.
-
Go to Return Items > Add Items and:
-
Select WSH12-32-Red and WSH12-32-Purple
-
Click Add Selected Products to returns:
- Set Requested = 1
- Set Return Reason to Out of Service
- Set Item Condition to Opened
- Set Resolution to Refund
-
Click Submit Returns.
-
-
Open Returns and select Return Items on the left.
- Set Authorized = 1 for both the products
- Set Status as Authorized for WSH12-32-Purple
- Set Status as Denied for WSH12-32-Red
- Click Save
-
Create a new order with the same products.
-
Create an Invoice, Shipment, and Returns for the same products. Authorize both and proceed until the end of the Returns process.
-
Generate a customer token using the following GraphQL query:
code language-graphql mutation { generateCustomerToken(email: "roni_cost@example.com", password: "password") { token } }
-
Authorize with the received token and perform following query:
code language-none { customer { returns(pageSize: 20, currentPage: 1) { total_count items { uid number status created_at } } } }
Expected results:
The query does not show any error. The status of the second return is not null.
Actual results:
The query returns an internal server error:
{
"errors": [
{
"message": "Internal server error",
"locations": [
{
"line": 8,
"column": 5
}
],
"path": [
"customer",
"returns",
"items",
1,
"status"
]
}
],
"data": {
"customer": {
"returns": {
"total_count": 2,
"items": [
{
"uid": "MQ==",
"number": "000000001",
"status": "PARTIALLY_AUTHORIZED",
"created_at": "2024-07-09 10:35:55"
},
{
"uid": "Mg==",
"number": "000000002",
"status": null,
"created_at": "2024-07-09 10:50:02"
}
]
}
}
}
}
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.