ACSD-65935: customerOrders GraphQL query returned an internal server error when a product is deleted
The ACSD-65935 patch fixes the issue where the customerOrders GraphQL query returned an internal server error when a product is deleted. This patch is available when the Quality Patches Tool (QPT) 1.1.67 is installed. The patch ID is ACSD-65935. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7-p6
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 customerOrders GraphQL query returns an internal server error when a product is deleted.
Steps to reproduce:
- Create two simple products
- Create a customer and place an order with two products from the frontend.
- Go to the backend and delete one product.
- Create a customer token:
https://localhost/pub/graphql
mutation {
generateCustomerToken(email: "test@test.com", password: "123123qA") {
token
}
}
- Retrieve the list of orders using the
eligible_for_returnfilter (used in PWA to fetch customer orders):
https://localhost/pub/graphql
{
customerOrders {
items {
order_number
id
created_at
grand_total
status
items{
eligible_for_return
}
}
}
}
Expected results:
Order list is collected without errors.
Actual results:
Exception : Internal server error
[2025-05-16T23:42:15.174025+00:00] report.ERROR: Call to a member function getIsReturnable() on null
{"exception":"[object] (GraphQL\\Error\\Error(code: 0): Call to a member function getIsReturnable() on null at /var/www/html/localhost/vendor/webonyx/graphql-php/src/Error/Error.php:170) [previous exception] [object] (Error(code: 0): Call to a member function getIsReturnable() on null at /var/www/html/localhost/magento2ee/app/code/Magento/Rma/Helper/Data.php:644)"}
[]
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: A self-service tool for quality patches in the Tools guide.