MDVA-41305: Error on GraphQL Query addProductsToWishlist for Configurable Products
The MDVA-41305 patch solves the issue where users get an error on GraphQL query addProductsToWishlist
for configurable products. This patch is available when the Quality Patches Tool (QPT) 1.1.10 is installed. The patch ID is MDVA-41305. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.5.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.2
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.2 - 2.4.3-p1
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
When users add configurable products (with/without configuration) to the Wishlist by GraphQL, they are unable to get configurable SKUs and configurable options in response.
Steps to reproduce:
-
Create a configurable product (with Blue, Grey, and one custom option).
-
Open frontend; log in as a customer and create a Wishlist (check wishlist_id).
-
Open postman and create a customer token:
code language-graphql mutation { generateCustomerToken(email: "", password: "") { token } }
-
Set this token for Bearer Authorization.
-
Try to add a configurable product Blue to the wishlist using the following instructions:
mutation {
addProductsToWishlist(
wishlistId: 1
wishlistItems: [
{
sku: "conf2"
selected_options: [
"Y29uZmlndXJhYmxlLzkzLzUw"
]
quantity: 1
entered_options: [
{
uid: "Y3VzdG9tLW9wdGlvbi8x"
value: "test"
}
]
}
]
) {
wishlist {
id
items_count
items_v2 (currentPage: 1, pageSize: 8 ) {
items {
id
quantity
... on ConfigurableWishlistItem {
child_sku
customizable_options {
customizable_option_uid
}
}
product {
uid
name
sku
options_container
... on CustomizableProductInterface {
options {
title
required
sort_order
option_id
... on CustomizableFieldOption {
value {
uid
sku
price
price_type
max_characters
}
}
}
}
price_range {
minimum_price {
regular_price {
currency
value
}
}
maximum_price {
regular_price {
currency
value
}
}
}
}
}
}
}
user_errors {
code
message
}
}
}
Expected results:
Users can see a set of configured product options in the response specified in the payload and added to the wishlist.
Actual results:
Users get an Internal Server Error in response.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.