Skip to content

Commit 1d841c3

Browse files
committed
[Wishlist] Remove name from WishlistOutput #920
1 parent 97a2027 commit 1d841c3

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

app/code/Magento/WishlistGraphQl/etc/module.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_WishlistGraphQl" />
9+
<module name="Magento_WishlistGraphQl">
10+
<sequence>
11+
<module name="Magento_Customer"/>
12+
<module name="Magento_CustomerGraphQl"/>
13+
</sequence>
14+
</module>
1015
</config>

app/code/Magento/WishlistGraphQl/etc/schema.graphqls

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ type Query {
55
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)
66
}
77

8-
type WishlistOutput {
8+
type Customer {
9+
wishlists: Wishlist! @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistResolver") @cache(cacheable: false)
10+
}
11+
12+
type WishlistOutput @doc(description: "Deprecated: 'Wishlist' type should be used instead") {
13+
items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @doc(description: "Deprecated: use field `items` from type `Wishlist`"),
14+
items_count: Int @doc(description: "Deprecated: use field `items_count` from type `Wishlist`"),
15+
name: String @doc(description: "Deprecated."),
16+
sharing_code: String @doc(description: "Deprecated: use field `sharing_code` from type `Wishlist`"),
17+
updated_at: String @doc(description: "Deprecated: use field `updated_at` from type `Wishlist`")
18+
}
19+
20+
type Wishlist {
921
items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @doc(description: "An array of items in the customer's wish list"),
1022
items_count: Int @doc(description: "The number of items in the wish list"),
11-
name: String @doc(description: "When multiple wish lists are enabled, the name the customer assigns to the wishlist"),
1223
sharing_code: String @doc(description: "An encrypted code that Magento uses to link to the wish list"),
1324
updated_at: String @doc(description: "The time of the last modification to the wish list")
1425
}

0 commit comments

Comments
 (0)