-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add wishlists in products query as a graph #482
base: master
Are you sure you want to change the base?
Add wishlists in products query as a graph #482
Conversation
Thanks for this! Yes, https://jira.corp.magento.com/browse/PWA-1268 calls for the following UI: Notice the heart indicators for whether or not a product has already been favorited. This PR will help the storefront know immediately how to display that heart / favorite indicator instead of having to do a bunch of custom client-side logic and additional wishlist lookups. |
By default a product is not assigned to any wishlist | ||
|
||
### Considerations of performance versus graphql specs | ||
The UI really needs this to render a PDP page or Category with products page and list a dropdown of wishlists of which the product is assigned to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@supernova-at how do you feel about this? we would lean to not expose the whole wishlist type and create a loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd lean that way too. I suppose I could envision a scenario where the UI would want to show the names of the wishlists that the product belonged to, but I think it's perfectly reasonable to have the front end make an additional query for the full wishlist data.
As long as the minimal type would give us enough information to look up the full wishlist, I think that's fine 👍 .
For example, type gives wishlistID
and then there's a way to get wishlists by wishlistID
.
Problem
Products query doesn't contain reference to wishlist, it takes a round trip to render a PDP page dropdown to what wishlists are assgined to the product
Solution
add the reference in schema
Requested Reviewers