Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 364cf2d

Browse files
authored
Deprecate wishlist query (#5952)
1 parent 38a8a08 commit 364cf2d

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

_includes/graphql/customer-output.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Attribute | Data Type | Description
1717
`prefix` | String | An honorific, such as Dr., Mr., or Mrs.
1818
`suffix` | String | A value such as Sr., Jr., or III
1919
`taxvat` | String | The customer's Tax/VAT number (for corporate customers)
20+
`wishlist` | Wishlist! | Contains the contents of the customer's wish lists
2021

2122
{% include graphql/customer-address-output.md %}

guides/v2.3/graphql/queries/customer.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,83 @@ query {
188188
}
189189
}
190190
```
191+
### Retrieve the customer's wish list
191192

193+
The following query returns the customer's wish list:
194+
195+
**Request**
196+
197+
```graphql
198+
{
199+
customer {
200+
wishlist {
201+
items {
202+
id
203+
description
204+
qty
205+
product {
206+
sku
207+
name
208+
price_range {
209+
maximum_price {
210+
regular_price {
211+
value
212+
}
213+
}
214+
}
215+
}
216+
}
217+
}
218+
}
219+
}
220+
```
221+
222+
**Response**
223+
224+
```json
225+
{
226+
"data": {
227+
"customer": {
228+
"wishlist": {
229+
"items": [
230+
{
231+
"id": 1,
232+
"description": "I need this",
233+
"qty": 1,
234+
"product": {
235+
"sku": "24-WG080",
236+
"name": "Sprite Yoga Companion Kit",
237+
"price_range": {
238+
"maximum_price": {
239+
"regular_price": {
240+
"value": 77
241+
}
242+
}
243+
}
244+
}
245+
},
246+
{
247+
"id": 2,
248+
"description": null,
249+
"qty": 1,
250+
"product": {
251+
"sku": "24-UG04",
252+
"name": "Zing Jump Rope",
253+
"price_range": {
254+
"maximum_price": {
255+
"regular_price": {
256+
"value": 12
257+
}
258+
}
259+
}
260+
}
261+
}
262+
]
263+
}
264+
}
265+
}
266+
}
267+
```
192268
## Output attributes
193269

194270
### Customer attributes {#customerAttributes}
@@ -197,6 +273,26 @@ The `customer` object can contain the following attributes:
197273

198274
{% include graphql/customer-output.md %}
199275

276+
### Wishlist attributes {#Wishlist}
277+
278+
Attribute | Data type | Description
279+
--- | --- | ---
280+
`items` | [WishlistItem](#wishlistitem) | An array of items in the customer's wish list
281+
`items_count` | Int | The number of items in the wish list
282+
`id` | ID | The unique identifier of the wish list
283+
`sharing_code` | String | An encrypted code that Magento uses to link to the wish list
284+
`updated_at` | String | The time of the last modification to the wish list
285+
286+
### WishlistItem attributes {#wishlistitem}
287+
288+
Attribute | Data type | Description
289+
--- | --- | ---
290+
`added_at` | String | The time when the customer added the item to the wish list
291+
`description` | String | The customer's comment about this item
292+
`id` | Int | The wish list item ID
293+
`product` | [ProductInterface]({{ page.baseurl }}/graphql/product/product-interface.html) | The ProductInterface contains attributes that are common to all types of products. Note that descriptions may not be available for custom and EAV attributes
294+
`qty` | Float | The quantity of this wish list item
295+
200296
### Store credit attributes
201297

202298
In {{site.data.var.ee}}, the merchant can assign store credit to customers. Magento maintains the history of all changes to the balance of store credit available to the customer. The customer must be logged in to access the store credit history and balance.

guides/v2.3/graphql/queries/wishlist.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ redirect_from:
55
- /guides/v2.3/graphql/reference/wishlist.html
66
---
77

8+
{:.bs-callout-warning}
9+
The `wishlist` query has been deprecated. Wish list information is now provided by the [customer]({{page.baseurl}}/graphql/queries/customer.html) query.
10+
811
Use the `wishlist` query to retrieve information about a customer's wish list. [Get customer authorization token]({{page.baseurl}}/graphql/get-customer-authorization-token.html) describes how to supply an authorization token for a specific customer.
912

1013
## Syntax

0 commit comments

Comments
 (0)