diff --git a/app/code/Magento/WishlistGraphQl/etc/module.xml b/app/code/Magento/WishlistGraphQl/etc/module.xml index 337623cc85a92..c2f5b3165b2ab 100644 --- a/app/code/Magento/WishlistGraphQl/etc/module.xml +++ b/app/code/Magento/WishlistGraphQl/etc/module.xml @@ -6,5 +6,10 @@ */ --> - + + + + + + diff --git a/app/code/Magento/WishlistGraphQl/etc/schema.graphqls b/app/code/Magento/WishlistGraphQl/etc/schema.graphqls index 2aa5f03a787d0..7daf15596f19d 100644 --- a/app/code/Magento/WishlistGraphQl/etc/schema.graphqls +++ b/app/code/Magento/WishlistGraphQl/etc/schema.graphqls @@ -5,10 +5,21 @@ type Query { wishlist: WishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistResolver") @doc(description: "The wishlist query returns the contents of a customer's wish list") @cache(cacheable: false) } -type WishlistOutput { +type Customer { + wishlists: Wishlist! @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistResolver") @cache(cacheable: false) +} + +type WishlistOutput @doc(description: "Deprecated: 'Wishlist' type should be used instead") { + items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @doc(description: "Deprecated: use field `items` from type `Wishlist`"), + items_count: Int @doc(description: "Deprecated: use field `items_count` from type `Wishlist`"), + name: String @doc(description: "Deprecated."), + sharing_code: String @doc(description: "Deprecated: use field `sharing_code` from type `Wishlist`"), + updated_at: String @doc(description: "Deprecated: use field `updated_at` from type `Wishlist`") +} + +type Wishlist { items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @doc(description: "An array of items in the customer's wish list"), items_count: Int @doc(description: "The number of items in the wish list"), - name: String @doc(description: "When multiple wish lists are enabled, the name the customer assigns to the wishlist"), sharing_code: String @doc(description: "An encrypted code that Magento uses to link to the wish list"), updated_at: String @doc(description: "The time of the last modification to the wish list") }