Skip to content

Commit

Permalink
[Wishlist] Remove name from WishlistOutput #920
Browse files Browse the repository at this point in the history
  • Loading branch information
XxXgeoXxX committed Sep 23, 2019
1 parent 97a2027 commit 1d841c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 6 additions & 1 deletion app/code/Magento/WishlistGraphQl/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_WishlistGraphQl" />
<module name="Magento_WishlistGraphQl">
<sequence>
<module name="Magento_Customer"/>
<module name="Magento_CustomerGraphQl"/>
</sequence>
</module>
</config>
15 changes: 13 additions & 2 deletions app/code/Magento/WishlistGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 1d841c3

Please sign in to comment.