Open
Description
Preconditions and environment
- Magento 2.3.2 but the issue seems to be present on 2.4.5-p1 as well
- Magento 2 in developer mode so that errors appear
- Xdebug to make sure errors display
- Do not login in Frontend
Steps to reproduce
- Create a customer
mutation {
createCustomer(
input: {
firstname: "John"
lastname: "Doe"
email: "test1@example.com"
password: "Test1234"
is_subscribed: true
}
) {
customer {
firstname
lastname
email
is_subscribed
}
}
}
- Get a graphQL token
mutation {
generateCustomerToken(email: "test1@example.com", password: "Test1234") {
token
}
}
- Query wishlist
query {
wishlist {
items {
added_at
description
id
product {
name
image {
url
}
sku
}
qty
}
items_count
sharing_code
}
}
Expected result
"data": {
"wishlist": {
"items": null,
"items_count": null,
"sharing_code": null
}
}
Actual result
{
"errors": [
{
"debugMessage": "Missing key \"model\" in Wishlist value data",
"message": "Internal server error",
"category": "internal",
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"wishlist",
"items"
]
}
],
"data": {
"wishlist": {
"items": null,
"items_count": null,
"sharing_code": null
}
}
}
Additional information
This seems to be in vendor/magento/module-wishlist-graph-ql/Model/Resolver/WishlistResolver.php:63 where it returns an empty array, but instead it expects to have a model set for each item even with an empty array.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.