Add a field to Wishlist that indicates whether the wishlist belongs to a person or an organization.
For example:
type Wishlist {
...
ownerType: WishlistTypeEnum!
}where the value could, for example, be:
PERSONAL
ORGANIZATIONBackground
The Storefront GraphQL API currently supports retrieving both personal and organizational wishlists using:
wishlistType: BOTHHowever, when BOTH is used, there is no information on each individual Wishlist indicating which type it belongs to.
The client therefore cannot determine whether a specific wishlist is personal or organizational based on the returned result.
Current workaround
Today, we need to make two separate queries:
wishlistType: PERSONAL_ONLYand:
wishlistType: ORGANIZATION_ONLYThe results are then tagged on the client side before being merged.
Desired behavior
When wishlists are retrieved using wishlistType: BOTH, each Wishlist should include information about its ownership type.
This would allow the client to:
use a single query
distinguish between personal and organizational wishlists directly from the API response
avoid additional network requests and client-side logic
treat BOTH as a complete and self-contained API result
The name ownerType is only a suggestion. Another field name or enum would of course work if it better fits the existing GraphQL model.