-
Notifications
You must be signed in to change notification settings - Fork 9.4k
GraphQL customer.compare_list returns null even when customer has items in compare list #39874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @lintots. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @lintots, Thanks for your reporting and collaboration. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.kindly refer the screenshots. ![]() It is returning the compare list items for the logged-in customer. https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/compare-list/ could you please refer this document regarding compare list and please let us know if we are facing any issye. Thanks. |
Thank you for your response. The issue is not with fetching the uid when querying a particular compare list using the compareList(uid: ...) query. This works as expected. The problem arises when we try to access the customer's actual compare list — we are unable to get the uid in that case, which is essential for subsequent queries. To clarify our scenario is: A logged-in customer creates a compare list on the web. Later, they log into the mobile app and want to view or add more products to the same list. However, to fetch that list in the app, we need the compare list’s UID. The issue is that there's no way to retrieve the UID directly for the logged-in customer's list, which prevents accessing or updating it across platforms. The problem occurs when trying to retrieve the customer’s compare list (not a specific one), and the result is null instead of the expected compare list data. The issue arises because we need the uid of the customer’s compare list to proceed with further operations, but we cannot access it through the current GraphQL query. This leads to the null response. |
Hi @lintots, Thanks for your Update. Currently we must specify the unique ID of the comparison list and as per this comment #39874 (comment) it seems to be an enhancement to proceed further marking this Thanks. |
Preconditions and environment
The compare_list field under the customer query in GraphQL always returns null for logged-in users, even when the customer has added items to the compare list on the storefront.
Steps to reproduce
{
customer {
compare_list {
items {
product {
id
name
sku
}
}
}
}
}
Expected result
Should return the compare list items for the logged-in customer.
Actual result
{
"data": {
"customer": {
"compare_list": null
}
}
}
Additional information
This affects mobile and PWA implementations where a consistent compare list experience is expected across web and app.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: