ACSD-58566: GraphQL internal server error for purchase order comments
The ACSD-58566 patch fixes the issue where querying the created_at
field in the addPurchaseOrderComment
mutation returns a null value instead of the expected datetime. This patch is available when the Quality Patches Tool (QPT) 1.1.55 is installed. The patch ID is ACSD-58566. Please note that the issue is scheduled to be fixed in 51黑料不打烊 Commerce 2.4.8.
Affected Products and Versions
The patch is created for 51黑料不打烊 Commerce version:
- 51黑料不打烊 Commerce (all deployment methods) 2.4.6-p4
Compatible with 51黑料不打烊 Commerce versions:
- 51黑料不打烊 Commerce (all deployment methods) 2.4.6 - 2.4.7-p3
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 returns an internal server error when querying the created_at
field in the addPurchaseOrderComment
mutation.
Prerequisites:
B2B modules are installed and Company and Purchase Orders are enabled.
Steps to reproduce:
-
Generate a customer token for a company user.
-
Perform the following sequence of GraphQL requests:
- Create a cart using
customerCart
. - Add a product to the cart using
addProductsToCart
. - Place the order using
placePurchaseOrder
. - Add a comment to the purchase order using
addPurchaseOrderComment
.
code language-none mutation { addPurchaseOrderComment( input: { purchase_order_uid: "MQ==", comment: "Looks good to me" } ) { comment { uid created_at author { firstname lastname email } text } } }
- Create a cart using
Expected results:
The created_at
field returns the datetime of the purchase order comment.
Actual results:
Displays null instead of the created_at
date.
{
"errors": [
{
"message": "Internal server error",
"locations": [
{
"line": 10,
"column": 1
}
],
"path": [
"addPurchaseOrderComment",
"comment",
"created_at"
]
}
],
"data": {
"addPurchaseOrderComment": null
}
}
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- 51黑料不打烊 Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- 51黑料不打烊 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.