diff --git a/src/_data/toc/graphql.yml b/src/_data/toc/graphql.yml index 31a6fb85cba..b72b0ba041c 100644 --- a/src/_data/toc/graphql.yml +++ b/src/_data/toc/graphql.yml @@ -210,8 +210,8 @@ pages: - label: changeCustomerPassword mutation url: /graphql/mutations/change-customer-password.html - - label: copyProductsToWishlist mutation - url: /graphql/mutations/copy-products-to-wishlist.html + - label: copyProductsBetweenWishlists mutation + url: /graphql/mutations/copy-products-between-wishlists.html edition: ee-only exclude_versions: ["2.3"] @@ -319,8 +319,8 @@ pages: - label: mergeCarts mutation url: /graphql/mutations/merge-carts.html - - label: moveProductsToWishlist mutation - url: /graphql/mutations/move-products-to-wishlist.html + - label: moveProductsBetweenWishlists mutation + url: /graphql/mutations/move-products-between-wishlists.html edition: ee-only exclude_versions: ["2.3"] @@ -509,6 +509,10 @@ pages: url: /graphql/interfaces/shipment-item-interface.html exclude_versions: ["2.3"] + - label: WishlistItemInterface attributes and implementations + url: /graphql/interfaces/wishlist-item-interface.html + exclude_versions: ["2.3"] + - label: Payment methods children: diff --git a/src/_includes/graphql/wishlist-item-interface.md b/src/_includes/graphql/wishlist-item-interface.md new file mode 100644 index 00000000000..e95b6bf3c41 --- /dev/null +++ b/src/_includes/graphql/wishlist-item-interface.md @@ -0,0 +1,10 @@ +The `WishlistItemInterface` contains the following attributes. + +Attribute | Data type | Description +--- | --- | --- +`added_at` | String! | The date and time the item was added to the wish list +`customizable_options`| [SelectedCustomizableOption] | Custom options selected for the wish list item +`description`| String | The description of the item +`id`| ID! | The ID of the wish list item +`product` | [ProductInterface]({{page.baseurl}}/graphql/interfaces/product-interface.html) | Product details of the wish list item +`quantity`| Float! | The quantity of this wish list item diff --git a/src/_includes/graphql/wishlist.md b/src/_includes/graphql/wishlist.md index 5bc13a10beb..57ef3e5bed9 100644 --- a/src/_includes/graphql/wishlist.md +++ b/src/_includes/graphql/wishlist.md @@ -2,11 +2,14 @@ The `Wishlist` object contains all the items in the customer's wish list. Attribute | Data type | Description --- | --- | --- -`id` | ID | The unique identifier of the wish list -`items` | [[WishlistItem](#WishlistItem)] | An array of items in the customer's wish list +`id` | ID | The unique ID of a `Wishlist` object +`items` | [[WishlistItem](#WishlistItem)] | Deprecated. Use `items_v2` instead +`items_v2` | [[WishlistItemInterface]]({{page.baseurl/graphql/interfaces/wishlist-item/interface.html}}) | An array of items in the customer's wish list `items_count` | Int | The number of items in the wish list +`name` | String | The wish list name. Applicable to {{site.data.var.ee}} only `sharing_code` | String | An encrypted code that Magento uses to link to the wish list `updated_at` | String | The time of the last modification to the wish list +`visibility` | WishlistVisibilityEnum! | An enum indicating whether the wish list is PUBLIC or PRIVATE. Applicable to {{site.data.var.ee}} only #### WishlistItem attributes {#WishlistItem} @@ -17,5 +20,5 @@ Attribute | Data type | Description `added_at` | String | The time when the customer added the item to the wish list `description` | String | The customer's comment about this item `id` | Int | The wish list item ID -`product` | [ProductInterface]({{ page.baseurl }}/graphql/interfaces/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 -`qty` | Float | The quantity of this wish list item \ No newline at end of file +`product` | [ProductInterface]({{page.baseurl}}/graphql/interfaces/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 +`qty` | Float | The quantity of this wish list item diff --git a/src/guides/v2.4/graphql/interfaces/wishlist-item-interface.md b/src/guides/v2.4/graphql/interfaces/wishlist-item-interface.md new file mode 100644 index 00000000000..6fad1cad690 --- /dev/null +++ b/src/guides/v2.4/graphql/interfaces/wishlist-item-interface.md @@ -0,0 +1,172 @@ +--- +group: graphql +title: WishlistItemInterface attributes and implementations +--- + +`WishlistItemInterface` provides details about items in a wish list. It has the following implementations: + +* [`BundleWishlistItem`](#BundleWishlistItem) +* [`ConfigurableWishlistItem`](#ConfigurableWishlistItem) +* [`DownloadableWishlistItem`](#DownloadableWishlistItem) +* [`GiftCardWishlistItem`](#GiftCardWishlistItem) +* [`GroupedProductWishlistItem`](#GroupedProductWishlistItem) +* [`SimpleWishlistItem`](#SimpleWishlistItem) +* [`VirtualWishlistItem`](#VirtualWishlistItem) + +## Attributes + +{% include graphql/wishlist-item-interface.md %} + +## Implementations + +### BundleWishlistItem attributes {#BundleWishlistItem} + +The `BundleWishlistItem` object defines the following bundle-product specific attribute: + +Attribute | Data type | Description +--- | --- | --- +`bundle_options` | [SelectedBundleOption!]| An array containing information about the selected bundle items + +### ConfigurableWishlistItem attributes {#ConfigurableWishlistItem} + +The `ConfigurableWishlistItem` object defines the following attributes that are specific to configurable products: + +Attribute | Data type | Description +--- | --- | --- +`child_sku` | String! | The SKU of the simple product corresponding to a set of selected configurable options +`configurable_options` | [SelectedConfigurableOption!] | An array of selected configurable options + +### DownloadableWishlistItem attributes {#DownloadableWishlistItem} + +The `DownloadableWishlistItem` object defines the following attributes that are specific to downloadable products: + +Attribute | Data type | Description +--- | --- | --- +`links_v2` | [DownloadableProductLinks] | An array containing information about the selected links +`samples` | [DownloadableProductSamples] | An array containing information about the selected samples + +### GiftCardWishlistItem attributes {#GiftCardWishlistItem} + +The `GiftCardWishlistItem` object defines the following gift card-specific attribute: + +Attribute | Data type | Description +--- | --- | --- +`gift_card_options` | GiftCardOptions! | Contains details about a gift card product + +#### GiftCardOptions attributes {#GiftCardOptions} + +The GiftCardOptions object provides details about a gift card. All attributes are optional for a wish list. + +Attribute | Data type | Description +--- | --- | --- +`amount` | Money | The amount and currency of the gift card +`custom_giftcard_amount` | Money | The custom amount and currency of the gift card +`message` | String | A message to the recipient +`recipient_email` | String | The email of the person receiving the gift card +`recipient_name` | String | The name of the person receiving the gift card +`sender_email` | String | The email of the sender +`sender_name` | String | The name of the sender + +### GroupedProductWishlistItem attributes {#GroupedProductWishlistItem} + +The GroupedProductWishlistItem data type does not provide additional attributes to the `WishlistItemInterface`. + +### SimpleWishlistItem attributes {#SimpleWishlistItem} + +The SimpleWishlistItem data type does not provide additional attributes to the `WishlistItemInterface`. + +### VirtualWishlistItem attributes {#VirtualWishlistItem} + +The VirtualWishlistItem data type does not provide additional attributes to the `WishlistItemInterface`. + +## Example usage + +The following mutation adds a downloadable product to a wish list and returns detailed information about the product. + +**Request:** + +```graphql +mutation { + addProductsToWishlist( + wishlistId: 3, + wishlistItems: [ + { + sku: "240-LV06" + quantity: 1 + } + ] +) { + user_errors { + code + message + } + wishlist { + id + sharing_code + items_count + updated_at + items_v2 { + uid + quantity + added_at + ... on DownloadableWishlistItem { + links_v2 { + uid + title + sample_url + } + samples { + title + sample_url + } + } + } + } + } +} +``` +**Response:** + +```json +{ + "data": { + "addProductsToWishlist": { + "user_errors": [], + "wishlist": { + "id": "3", + "sharing_code": "cVeOljNmNKm0e1jRFj7PRMyBXrpu88Sf", + "items_count": 1, + "updated_at": "2020-11-12 03:01:46", + "items_v2": [ + { + "uid": "MTQ=", + "quantity": 1, + "added_at": "2020-11-12 03:01:46", + "links_v2": [ + { + "uid": "ZG93bmxvYWRhYmxlLzM=", + "title": "Yoga Adventure", + "sample_url": "http://example.com/downloadable/download/linkSample/link_id/3/" + } + ], + "samples": [ + { + "title": "Trailer #1", + "sample_url": "http://example.com/downloadable/download/sample/sample_id/7/" + }, + { + "title": "Trailer #2", + "sample_url": "http://example.com/downloadable/download/sample/sample_id/8/" + }, + { + "title": "Trailer #3", + "sample_url": "http://example.com/downloadable/download/sample/sample_id/9/" + } + ] + } + ] + } + } + } +} +``` diff --git a/src/guides/v2.4/graphql/mutations/add-products-to-wishlist.md b/src/guides/v2.4/graphql/mutations/add-products-to-wishlist.md index e2c039ba136..1f1f57f5c02 100644 --- a/src/guides/v2.4/graphql/mutations/add-products-to-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/add-products-to-wishlist.md @@ -14,15 +14,21 @@ To determine whether wish lists are enabled, specify the `magento_wishlist_gener ## Syntax -`mutation: addProductsToWishlist(wishlistId: ID!, wishlistItems: [WishlistItemInput!]!): AddProductsToWishlistOutput` +```graphql +`mutation { + addProductsToWishlist( + wishlistId: ID!, + wishlistItems: [WishlistItemInput!]! + ){ + AddProductsToWishlistOutput + } +} +``` ## Example usage The following example adds a simple product (`24-MB01`), a configurable product (`WJ01-M-Red`), and a bundle product (`24-WG080`) to the customer's wish list. The SKU `WG-09` is invalid, and error information is returned in the `user_errors` object. -{:.bs-callout-info} -In Magento 2.4.1, the `addProductsToWishlist` mutation does not return `selected_options` or `entered_options` objects. Support for these objects will be provided in a future release. - To determine the value of the `wishlistId` attribute, run the `customer` query and check the value of `wishlist.id` in the response. **Request:** @@ -30,53 +36,65 @@ To determine the value of the `wishlistId` attribute, run the `customer` query a ``` graphql mutation { addProductsToWishlist( - wishlistId: 1 - wishlistItems: [ - { - sku: "24-MB01" - quantity: 1 - } - { - sku: "WG-09" - quantity: 1 - } - { - parent_sku: "WJ01" - sku: "WJ01-M-Red" - quantity: 1 - } - { - sku: "24-WG080" - quantity: 1 - selected_options: [ - "YnVuZGxlLzEvMS8x" - "YnVuZGxlLzIvNC8x" - "YnVuZGxlLzMvNy8x" - "YnVuZGxlLzQvOC8x" - ] - } - ]){ + wishlistId: 4 + wishlistItems: [ + { + sku: "24-MB01" + quantity: 1 + } + { + sku: "WG-09" + quantity: 1 + } + { + parent_sku: "WJ01" + sku: "WJ01-M-Red" + quantity: 1 + } + { + sku: "24-WG080" + quantity: 1 + selected_options: [ + "YnVuZGxlLzEvMS8x" + "YnVuZGxlLzIvNC8x" + "YnVuZGxlLzMvNy8x" + "YnVuZGxlLzQvOC8x" + ] + } + ] + ) { wishlist { id items_count - items { - id - qty - product { - name - sku + items_v2 (currentPage: 1, pageSize: 8 ) { + items { id - price_range { - minimum_price { - regular_price { - currency - value + quantity + ... on BundleWishlistItem { + bundle_options { + values { + id + label + quantity } } - maximum_price { - regular_price { - currency - value + } + product { + uid + name + sku + price_range { + minimum_price { + regular_price { + currency + value + } + } + maximum_price { + regular_price { + currency + value + } } } } @@ -98,79 +116,119 @@ mutation { "data": { "addProductsToWishlist": { "wishlist": { - "id": "1", + "id": "4", "items_count": 3, - "items": [ - { - "id": 16, - "qty": 1, - "product": { - "name": "Joust Duffle Bag", - "sku": "24-MB01", - "id": 1, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 34 - } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 34 + "items_v2": { + "items": [ + { + "id": "20", + "quantity": 1, + "product": { + "uid": "MQ==", + "name": "Joust Duffle Bag", + "sku": "24-MB01", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 34 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 34 + } } } } - } - }, - { - "id": 17, - "qty": 1, - "product": { - "name": "Stellar Solar Jacket", - "sku": "WJ01", - "id": 1226, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 75 - } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 75 + }, + { + "id": "21", + "quantity": 1, + "product": { + "uid": "MTIyNg==", + "name": "Stellar Solar Jacket", + "sku": "WJ01", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 75 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 75 + } } } } - } - }, - { - "id": 18, - "qty": 1, - "product": { - "name": "Sprite Yoga Companion Kit", - "sku": "24-WG080", - "id": 46, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 61 - } + }, + { + "id": "22", + "quantity": 1, + "bundle_options": [ + { + "values": [ + { + "id": 1, + "label": "Sprite Stasis Ball 55 cm", + "quantity": 1 + } + ] + }, + { + "values": [ + { + "id": 4, + "label": "Sprite Foam Yoga Brick", + "quantity": 1 + } + ] + }, + { + "values": [ + { + "id": 7, + "label": "Sprite Yoga Strap 10 foot", + "quantity": 1 + } + ] }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 77 + { + "values": [ + { + "id": 8, + "label": "Sprite Foam Roller", + "quantity": 1 + } + ] + } + ], + "product": { + "uid": "NTI=", + "name": "Sprite Yoga Companion Kit", + "sku": "24-WG080", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 61 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 77 + } } } } } - } - ] + ] + } }, "user_errors": [ { diff --git a/src/guides/v2.4/graphql/mutations/copy-products-between-wishlists.md b/src/guides/v2.4/graphql/mutations/copy-products-between-wishlists.md new file mode 100644 index 00000000000..0fe21ace173 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/copy-products-between-wishlists.md @@ -0,0 +1,184 @@ +--- +group: graphql +title: copyProductsBetweenWishlists mutation +ee_only: true +--- + +The `copyProductsBetweenWishlists` mutation copies the specified quantities of one or more products to a different wish list. The original wish list is unchanged. + +Use the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to return a list of wish list IDs and item IDs. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +## Syntax + +```graphql +mutation { + copyProductsBetweenWishlists( + sourceWishlistUid: ID!, + destinationWishlistUid: ID!, + wishlistItems: [WishlistItemCopyInput!]! + ){ + CopyProductsBetweenWishlistsOutput + } +} +``` + +## Example usage + +The following example copies two items to another wish list. + +**Request:** + +``` graphql +mutation{ + copyProductsBetweenWishlists(sourceWishlistUid: 1, destinationWishlistUid: 2, wishlistItems: [ + { + wishlist_item_id: 6 + quantity: 1 + } + { + wishlist_item_id: 7 + quantity: 1 + } + ]){ + destination_wishlist { + id + items_v2 { + items { + id + product { + uid + sku + name + } + } + } + } + user_errors { + code + message + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "copyProductsBetweenWishlists": { + "destination_wishlist": { + "id": "2", + "items_v2": { + "items": [ + { + "id": "8", + "product": { + "uid": "NDk=", + "sku": "240-LV08", + "name": "Advanced Pilates & Yoga (Strength)" + } + }, + { + "id": "9", + "product": { + "uid": "MTg=", + "sku": "24-UG02", + "name": "Pursuit Lumaflex™ Tone Band" + } + }, + { + "id": "10", + "product": { + "uid": "MTQ1MA==", + "sku": "WS04", + "name": "Layla Tee" + } + }, + { + "id": "11", + "product": { + "uid": "MTU2Mg==", + "sku": "WS12", + "name": "Radiant Tee" + } + }, + { + "id": "12", + "product": { + "uid": "MTYxMA==", + "sku": "WB01", + "name": "Electra Bra Top" + } + }, + { + "id": "13", + "product": { + "uid": "MTY0Mg==", + "sku": "WB03", + "name": "Celeste Sports Bra" + } + }, + { + "id": "15", + "product": { + "uid": "MTcyMg==", + "sku": "WT03", + "name": "Nora Practice Tank" + } + }, + { + "id": "16", + "product": { + "uid": "MTY5MA==", + "sku": "WT01", + "name": "Bella Tank" + } + } + ] + } + }, + "user_errors": [] + } + } +} +``` + +## Input attributes + +The `copyProductsBetweenWishlists` mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +`destinationWishlistUid` | ID! | The ID of the wishlist to copy products to +`sourceWishlistUid` | ID! | The ID of the origin wishlist +`wishlistItems` | [WishlistItemCopyInput!]! | A list of items to be copied + +### WishlistItemCopyInput attributes {#WishlistItemCopyInput} + +The WishlistItemCopyInput object contains the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`quantity` | Float | The quantity of this item to move to the destination wish list. This value cannot be greater than the quantity in the source wish list +`wishlist_item_id` | ID! | The unique ID of the `WishlistItemInterface` object to be copied + +## Output attributes + +The `CopyProductsBetweenWishlistsOutput` object can contain the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`destination_wishlist` | [Wishlist!](#Wishlist) | The destination wish list containing the copied products +`source_wishlist` | [Wishlist!](#Wishlist) | The wish list that the products were copied from +`user_errors` | [[WishListUserInputError!](#WishListUserInputError)] | An array of errors encountered while copying products to a wish list + +### Wishlist attributes {#Wishlist} + +{% include graphql/wishlist.md %} + +### WishListUserInputError attributes {#WishListUserInputError} + +{% include graphql/wishlist-user-input-errors.md %} diff --git a/src/guides/v2.4/graphql/mutations/copy-products-to-wishlist.md b/src/guides/v2.4/graphql/mutations/copy-products-to-wishlist.md deleted file mode 100644 index e52046d04bf..00000000000 --- a/src/guides/v2.4/graphql/mutations/copy-products-to-wishlist.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -group: graphql -title: copyProductsToWishlist mutation -ee_only: true ---- - -The `copyProductsToWishlist` mutation copies the specified quantities of one or more products to a different wish list. The original wish list is unchanged. - -Use the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to return a list of wish list IDs and item IDs. - -This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). - -## Syntax - -```graphql -mutation { - copyProductsToWishlist( - wishlistId: ID! - wishlistItems: [WishlistItemMoveInput!]! - ) { - UpdateProductsInWishlistOutput - } -} -``` - -## Example usage - -The following example copies two items to another wish list. - -**Request:** - -``` graphql -mutation { - copyProductsToWishlist( - wishlistId: 4 - wishlistItems: [{ - wishlist_item_id: 28 - quantity: 1 - } - { - wishlist_item_id:29 - quantity: 1 - }] - ) { - wishlist { - id - name - items_v2 { - id - quantity - product { - sku - name - } - } - } - } -} -``` - -**Response:** - -```json -{ - "data": { - "copyProductsToWishlist": { - "wishlist": { - "id": "4", - "name": "My favorite things", - "items_v2": [ - { - "id": "26", - "quantity": 1, - "product": { - "sku": "24-WG080", - "name": "Sprite Yoga Companion Kit" - } - }, - { - "id": "27", - "quantity": 1, - "product": { - "sku": "WSH12", - "name": "Erika Running Short" - } - }, - { - "id": "30", - "quantity": 1, - "product": { - "sku": "24-WB02", - "name": "Compete Track Tote" - } - }, - { - "id": "31", - "quantity": 1, - "product": { - "sku": "24-UG07", - "name": "Dual Handle Cardio Ball" - } - } - ] - } - } - } -} -``` - -## Input attributes - -The `copyProductsToWishlist` mutation requires the following input. - -Attribute | Data Type | Description ---- | --- | --- -`wishlistId` | ID! | The ID of the target wish list -`wishlistItems` | [WishlistItemCopyInput!]! | An array containing a set of wish list IDs that are to be copied - -### WishlistItemCopyInput attributes {#WishlistItemCopyInput} - -The WishlistItemCopyInput object contains the following attributes. - -Attribute | Data Type | Description ---- | --- | --- -`quantity` | Float | The quantity of this item to move to the destination wish list. This value cannot be greater than the quantity in the source wish list -`wishlist_item_id` | ID! | The ID of the item to be copied - -## Output attributes - -The `UpdateProductsInWishlistOutput` object can contain the following attributes. - -Attribute | Data Type | Description ---- | --- | --- -`user_errors` | [[WishListUserInputError!](#WishListUserInputError)]! | An array of errors encountered while adding products to a wish list -`wishlist` | [Wishlist!](#Wishlist) | Contains the wish list with all items that were successfully added - -### Wishlist attributes {#Wishlist} - -{% include graphql/wishlist.md %} - -### WishListUserInputError attributes {#WishListUserInputError} - -{% include graphql/wishlist-user-input-errors.md %} diff --git a/src/guides/v2.4/graphql/mutations/create-wishlist.md b/src/guides/v2.4/graphql/mutations/create-wishlist.md index dc30548f985..35e389b2db7 100644 --- a/src/guides/v2.4/graphql/mutations/create-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/create-wishlist.md @@ -19,10 +19,7 @@ Use the [`storeConfig` query]({{page.baseurl}}/graphql/queries/store-config.html ```graphql mutation { - createWishlist( - name: String! - visibility: WishlistVisibilityEnum! - ) { + createWishlist(input: CreateWishlistInput!) { CreateWishlistOutput } } @@ -36,12 +33,16 @@ The following example creates the `My favorites` public wish list. ``` graphql mutation { - createWishlist( + createWishlist(input: { name: "My favorites" visibility: PUBLIC + } ) { - uid - visibility + wishlist { + id + name + visibility + } } } ``` @@ -52,8 +53,11 @@ mutation { { "data": { "createWishlist": { - "uid": "4", - "visibility": "PUBLIC" + "wishlist": { + "id": "3", + "name": "My favorites", + "visibility": "PUBLIC" + } } } } @@ -61,7 +65,7 @@ mutation { ## Input attributes -The `createWishlist` mutation requires the following input. +The `CreateWishlistInput` object requires the following input. Attribute | Data Type | Description --- | --- | --- @@ -70,10 +74,6 @@ Attribute | Data Type | Description ## Output attributes -The `CreateWishlistOutput` object returns the `uid` of the new wish list as well as the input attributes. +The `createWishlist` mutation returns the Wishlist object. -Attribute | Data Type | Description ---- | --- | --- -`name` | String! | The wish list name -`uid` | ID! | The ID of the new wish list -`visibility` | WishlistVisibilityEnum! | The wish list visibility. Possible values are `PRIVATE` and `PUBLIC` +{% include graphql/wishlist.md %} diff --git a/src/guides/v2.4/graphql/mutations/delete-wishlist.md b/src/guides/v2.4/graphql/mutations/delete-wishlist.md index 6ad3b0f8924..dcbb32d93cb 100644 --- a/src/guides/v2.4/graphql/mutations/delete-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/delete-wishlist.md @@ -12,7 +12,7 @@ This mutation requires a valid [customer authentication token]({{page.baseurl}}/ ```graphql mutation { - deleteWishlist(wishlistId: ID!) + deleteWishlist(wishlistId: ID!): DeleteWishlistOutput } ``` @@ -23,8 +23,15 @@ The following example deletes a wish list. **Request:** ``` graphql -mutation { - deleteWishlist(wishlistId: 3) +mutation{ + deleteWishlist(wishlistId: 3){ + status + wishlists { + id + name + items_count + } + } } ``` @@ -33,7 +40,21 @@ mutation { ```json { "data": { - "deleteWishlist": true + "deleteWishlist": { + "status": true, + "wishlists": [ + { + "id": "1", + "name": "Vacation Wants", + "items_count": 7 + }, + { + "id": "2", + "name": "Lose the Muffintop", + "items_count": 6 + } + ] + } } } ``` @@ -44,8 +65,17 @@ The `deleteWishlist` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`wishlistId` | ID! | The ID of the wish list to update +`wishlistId` | ID! | The ID of the wish list to delete ## Output attributes -The `deleteWishlist` object returns a Boolean value, indicating whether the request was successful. +The DeleteWishlistOutput object can contain the following attributes: + +Attribute | Data Type | Description +--- | --- | --- +`status` | Boolean! | Indicates whether the wish list was deleted +`wishlists` | [Wishlist]! | An array of wish lists that have not been deleted + +### Wishlist attributes {#Wishlist} + +{% include graphql/wishlist.md %} diff --git a/src/guides/v2.4/graphql/mutations/move-products-between-wishlists.md b/src/guides/v2.4/graphql/mutations/move-products-between-wishlists.md new file mode 100644 index 00000000000..01e428aa648 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/move-products-between-wishlists.md @@ -0,0 +1,258 @@ +--- +group: graphql +title: moveProductsBetweenWishlists mutation +ee_only: true +--- + +The `moveProductsBetweenWishlists` mutation moves the specified quantities of one or more products to a different wish list. + +If you do not specify a quantity for a product, the mutation moves the entire quantity of that product to the target wish list. + +Use the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to return a list of wish list IDs and item IDs. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +## Syntax + +```graphql +mutation { + moveProductsBetweenWishlists( + sourceWishlistUid: ID!, + destinationWishlistUid: ID!, + wishlistItems: [WishlistItemMoveInput!]! + ) { + MoveProductsBetweenWishlistsOutput + } +} +``` + +## Example usage + +The following example moves an item to another wish list. The ID of the moved product changes. + +**Request:** + +``` graphql +mutation{ + moveProductsBetweenWishlists(sourceWishlistUid: 2, destinationWishlistUid: 1, wishlistItems: [ + { + wishlist_item_id: 9 + quantity: 1 + } + ]){ + source_wishlist { + id + items_v2 { + items { + id + product { + uid + sku + name + } + } + } + } + destination_wishlist { + id + items_v2 { + items { + id + product { + uid + sku + name + } + } + } + } + user_errors { + code + message + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "moveProductsBetweenWishlists": { + "source_wishlist": { + "id": "2", + "items_v2": { + "items": [ + { + "id": "8", + "product": { + "uid": "NDk=", + "sku": "240-LV08", + "name": "Advanced Pilates & Yoga (Strength)" + } + }, + { + "id": "10", + "product": { + "uid": "MTQ1MA==", + "sku": "WS04", + "name": "Layla Tee" + } + }, + { + "id": "11", + "product": { + "uid": "MTU2Mg==", + "sku": "WS12", + "name": "Radiant Tee" + } + }, + { + "id": "12", + "product": { + "uid": "MTYxMA==", + "sku": "WB01", + "name": "Electra Bra Top" + } + }, + { + "id": "13", + "product": { + "uid": "MTY0Mg==", + "sku": "WB03", + "name": "Celeste Sports Bra" + } + }, + { + "id": "15", + "product": { + "uid": "MTcyMg==", + "sku": "WT03", + "name": "Nora Practice Tank" + } + }, + { + "id": "16", + "product": { + "uid": "MTY5MA==", + "sku": "WT01", + "name": "Bella Tank" + } + } + ] + } + }, + "destination_wishlist": { + "id": "1", + "items_v2": { + "items": [ + { + "id": "1", + "product": { + "uid": "MTM=", + "sku": "24-WB07", + "name": "Overnight Duffle" + } + }, + { + "id": "2", + "product": { + "uid": "MTA=", + "sku": "24-WB05", + "name": "Savvy Shoulder Tote" + } + }, + { + "id": "3", + "product": { + "uid": "MTE=", + "sku": "24-WB06", + "name": "Endeavor Daytrip Backpack" + } + }, + { + "id": "4", + "product": { + "uid": "MTA5OA==", + "sku": "WH04", + "name": "Miko Pullover Hoodie" + } + }, + { + "id": "5", + "product": { + "uid": "MTIyNg==", + "sku": "WJ01", + "name": "Stellar Solar Jacket" + } + }, + { + "id": "6", + "product": { + "uid": "MTcyMg==", + "sku": "WT03", + "name": "Nora Practice Tank" + } + }, + { + "id": "7", + "product": { + "uid": "MTY5MA==", + "sku": "WT01", + "name": "Bella Tank" + } + }, + { + "id": "17", + "product": { + "uid": "MTg=", + "sku": "24-UG02", + "name": "Pursuit Lumaflex™ Tone Band" + } + } + ] + } + }, + "user_errors": [] + } + } +} +``` + +## Input attributes + +The `moveProductsBetweenWishlists` mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +`destinationWishlistUid` | ID! | The ID of the wishlist to move products to +`sourceWishlistUid` | ID! | The ID of the origin wishlist +`wishlistItems` | [WishlistItemMoveInput!]! | A list of items to be moved + +### WishlistItemMoveInput attributes {#WishlistItemMoveInput} + +The WishlistItemMoveInput object contains the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`quantity` | Float | The quantity of this item to move to the destination wish list. This value cannot be greater than the quantity in the source wish list +`wishlist_item_id` | ID! | The unique ID of the `WishlistItemInterface` item to be moved + +## Output attributes + +The `MoveProductsBetweenWishlistsOutput` object can contain the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`destination_wishlist` | [Wishlist!](#Wishlist) | The destination wish list containing the moved products +`source_wishlist` | [Wishlist!](#Wishlist) | The wish list that the products were moved from +`user_errors` | [[WishListUserInputError!](#WishListUserInputError)] | An array of errors encountered while copying products in a wish list + +### Wishlist attributes {#Wishlist} + +{% include graphql/wishlist.md %} + +### WishListUserInputError attributes {#WishListUserInputError} + +{% include graphql/wishlist-user-input-errors.md %} diff --git a/src/guides/v2.4/graphql/mutations/move-products-to-wishlist.md b/src/guides/v2.4/graphql/mutations/move-products-to-wishlist.md deleted file mode 100644 index 91436e38927..00000000000 --- a/src/guides/v2.4/graphql/mutations/move-products-to-wishlist.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -group: graphql -title: moveProductsToWishlist mutation -ee_only: true ---- - -The `moveProductsToWishlist` mutation moves the specified quantities of one or more products to a different wish list. Because the `wishlist_item_id` for each item placed in a wish list is unique, there is no need to specify the original wish list. - -If you do not specify a quantity for a product, the mutation moves the entire quantity of that product to the target wish list. - -Use the [`customer` query]({{page.baseurl}}/graphql/queries/customer.html) to return a list of wish list IDs and item IDs. - -This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). - -## Syntax - -```graphql -mutation { - moveProductsToWishlist( - wishlistId: ID! - wishlistItems: [WishlistItemMoveInput!]! - ) { - UpdateProductsInWishlistOutput - } -} -``` - -## Example usage - -The following example moves an item to another wish list. The ID of the moved product changes. - -**Request:** - -``` graphql -mutation { - moveProductsToWishlist( - wishlistId: 4 - wishlistItems: { - wishlist_item_id: 20 - quantity: 1 - } - ) { - wishlist { - id - name - items_v2 { - id - quantity - product { - sku - name - } - } - } - } -} -``` - -**Response:** - -```json -{ - "data": { - "moveProductsToWishlist": { - "wishlist": { - "id": "4", - "name": "My favorite things", - "items_v2": [ - { - "id": "26", - "quantity": 1, - "product": { - "sku": "24-WG080", - "name": "Sprite Yoga Companion Kit" - } - } - ] - } - } - } -} -``` - -## Input attributes - -The `moveProductsToWishlist` mutation requires the following input. - -Attribute | Data Type | Description ---- | --- | --- -`wishlistId` | ID! | The ID of the wish list to update -`wishlistItems` | [WishlistItemMoveInput!]! | An array containing a set of wish list IDs that are to be moved - -### WishlistItemMoveInput attributes {#WishlistItemMoveInput} - -The WishlistItemMoveInput object contains the following attributes. - -Attribute | Data Type | Description ---- | --- | --- -`quantity` | Float | The quantity of this item to move to the destination wish list. This value cannot be greater than the quantity in the source wish list -`wishlist_item_id` | ID! | The ID of the item to be moved - -## Output attributes - -The `UpdateProductsInWishlistOutput` object can contain the following attributes. - -Attribute | Data Type | Description ---- | --- | --- -`user_errors` | [[WishListUserInputError!](#WishListUserInputError)] | An array of errors encountered while adding products to a wish list -`wishlist` | [Wishlist!](#Wishlist) | Contains the wish list with all items that were successfully added - -### Wishlist attributes {#Wishlist} - -{% include graphql/wishlist.md %} - -### WishListUserInputError attributes {#WishListUserInputError} - -{% include graphql/wishlist-user-input-errors.md %} diff --git a/src/guides/v2.4/graphql/mutations/remove-products-from-wishlist.md b/src/guides/v2.4/graphql/mutations/remove-products-from-wishlist.md index 27859b9f486..ad8f5c7af41 100644 --- a/src/guides/v2.4/graphql/mutations/remove-products-from-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/remove-products-from-wishlist.md @@ -9,7 +9,16 @@ This mutation requires a valid [customer authentication token]({{page.baseurl}}/ ## Syntax -`mutation: removeProductsFromWishlist(wishlistId: ID! wishlistItemsIds: [ID!]!): RemoveProductsFromWishlistOutput` +```graphql +mutation { + removeProductsFromWishlist( + wishlistId: ID! + wishlistItemsIds: [ID!]! + ) { + RemoveProductsFromWishlistOutput + } +} + ``` ## Example usage @@ -20,31 +29,33 @@ The following example removes an item that was added in the [`addProductsToWishl ``` graphql mutation { removeProductsFromWishlist( - wishlistId: 1 + wishlistId: 4 wishlistItemsIds: [ - 12 + 26 ]){ wishlist { id items_count - items { - id - qty - product { - name - sku + items_v2 { + items { id - price_range { - minimum_price { - regular_price { - currency - value + quantity + product { + uid + name + sku + price_range { + minimum_price { + regular_price { + currency + value + } } - } - maximum_price { - regular_price { - currency - value + maximum_price { + regular_price { + currency + value + } } } } @@ -66,56 +77,58 @@ mutation { "data": { "removeProductsFromWishlist": { "wishlist": { - "id": "1", + "id": "4", "items_count": 2, - "items": [ - { - "id": 11, - "qty": 1, - "product": { - "name": "Sprite Yoga Companion Kit", - "sku": "24-WG080", - "id": 46, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 61 - } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 77 + "items_v2": { + "items": [ + { + "id": "27", + "quantity": 1, + "product": { + "uid": "MTIyNg==", + "name": "Stellar Solar Jacket", + "sku": "WJ01", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 75 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 75 + } } } } - } - }, - { - "id": 13, - "qty": 1, - "product": { - "name": "Stellar Solar Jacket", - "sku": "WJ01", - "id": 1226, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 75 - } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 75 + }, + { + "id": "28", + "quantity": 1, + "product": { + "uid": "NTI=", + "name": "Sprite Yoga Companion Kit", + "sku": "24-WG080", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 61 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 77 + } } } } } - } - ] + ] + } }, "user_errors": [] } diff --git a/src/guides/v2.4/graphql/mutations/update-products-in-wishlist.md b/src/guides/v2.4/graphql/mutations/update-products-in-wishlist.md index 7239bbf6afa..44eb8701b39 100644 --- a/src/guides/v2.4/graphql/mutations/update-products-in-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/update-products-in-wishlist.md @@ -13,7 +13,16 @@ This mutation requires a valid [customer authentication token]({{page.baseurl}}/ ## Syntax -`mutation: updateProductsInWishlist(wishlistId: ID! wishlistItems: [WishlistItemUpdateInput!]!): UpdateProductsInWishlistOutput` +```graphql +mutation { + updateProductsInWishlist( + wishlistId: ID! + wishlistItems: [WishlistItemUpdateInput!]! + ){ + UpdateProductsInWishlistOutput + } +} +``` ## Example usage @@ -24,47 +33,40 @@ The following example changes the quantity of the product represented by wish li ``` graphql mutation { updateProductsInWishlist( - wishlistId: 1 + wishlistId: 2 wishlistItems: [ { - wishlist_item_id: 16 + wishlist_item_id: 10 quantity: 2 } { - wishlist_item_id: 17 + wishlist_item_id: 11 description: "I love this!" } ]){ wishlist { id items_count - items { - id - qty - product { - name - sku + items_v2 { + items { id - ... on BundleProduct { - items { - sku - options { - id - uid - } - } - } - price_range { - minimum_price { - regular_price { - currency - value + quantity + product { + name + sku + uid + price_range { + minimum_price { + regular_price { + currency + value + } } - } - maximum_price { - regular_price { - currency - value + maximum_price { + regular_price { + currency + value + } } } } @@ -86,79 +88,196 @@ mutation { "data": { "updateProductsInWishlist": { "wishlist": { - "id": "1", - "items_count": 3, - "items": [ - { - "id": 16, - "qty": 2, - "product": { - "name": "Joust Duffle Bag", - "sku": "24-MB01", - "id": 1, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 34 + "id": "2", + "items_count": 8, + "items_v2": { + "items": [ + { + "id": "8", + "quantity": 1, + "product": { + "name": "Advanced Pilates & Yoga (Strength)", + "sku": "240-LV08", + "uid": "NDk=", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 18 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 18 + } } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 34 + } + } + }, + { + "id": "10", + "quantity": 1, + "product": { + "name": "Layla Tee", + "sku": "WS04", + "uid": "MTQ1MA==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 29 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 29 + } } } } - } - }, - { - "id": 17, - "qty": 1, - "product": { - "name": "Stellar Solar Jacket", - "sku": "WJ01", - "id": 1226, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 75 + }, + { + "id": "11", + "quantity": 1, + "product": { + "name": "Radiant Tee", + "sku": "WS12", + "uid": "MTU2Mg==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 22 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 22 + } } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 75 + } + } + }, + { + "id": "12", + "quantity": 1, + "product": { + "name": "Electra Bra Top", + "sku": "WB01", + "uid": "MTYxMA==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } } } } - } - }, - { - "id": 18, - "qty": 1, - "product": { - "name": "Sprite Yoga Companion Kit", - "sku": "24-WG080", - "id": 46, - "price_range": { - "minimum_price": { - "regular_price": { - "currency": "USD", - "value": 61 + }, + { + "id": "13", + "quantity": 1, + "product": { + "name": "Celeste Sports Bra", + "sku": "WB03", + "uid": "MTY0Mg==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } } - }, - "maximum_price": { - "regular_price": { - "currency": "USD", - "value": 77 + } + } + }, + { + "id": "15", + "quantity": 2, + "product": { + "name": "Nora Practice Tank", + "sku": "WT03", + "uid": "MTcyMg==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 39 + } + } + } + } + }, + { + "id": "24", + "quantity": 2, + "product": { + "name": "Layla Tee", + "sku": "WS04", + "uid": "MTQ1MA==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 29 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 29 + } + } + } + } + }, + { + "id": "25", + "quantity": 1, + "product": { + "name": "Radiant Tee", + "sku": "WS12", + "uid": "MTU2Mg==", + "price_range": { + "minimum_price": { + "regular_price": { + "currency": "USD", + "value": 22 + } + }, + "maximum_price": { + "regular_price": { + "currency": "USD", + "value": 22 + } } } } } - } - ] + ] + } }, "user_errors": [] } diff --git a/src/guides/v2.4/graphql/mutations/update-wishlist.md b/src/guides/v2.4/graphql/mutations/update-wishlist.md index 5c4677aa8fd..5438f4c8af2 100644 --- a/src/guides/v2.4/graphql/mutations/update-wishlist.md +++ b/src/guides/v2.4/graphql/mutations/update-wishlist.md @@ -16,7 +16,7 @@ This mutation requires a valid [customer authentication token]({{page.baseurl}}/ ```graphql mutation { updateWishlist( - wishlistId: ID! + wishlistUid: ID! name: String visibility: WishlistVisibilityEnum ) { @@ -34,7 +34,7 @@ The following example changes the name of an existing wish list. ``` graphql mutation { updateWishlist( - wishlistId: 4 + wishlistUid: 4 name: "My favorite things" visibility: PUBLIC ) { @@ -65,9 +65,9 @@ The `updateWishlist` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`name` | String! | The ID of the customer's wish list +`name` | String! | The unique ID of `Wishlist` object `visibility`| WishlistVisibilityEnum! | Describes the visibility of the wish list. Possible values are `PRIVATE` and `PUBLIC` -`wishlistId` | ID! | The ID of the wish list to update +`wishlistUid` | ID! | The ID of the wish list to update ## Output attributes diff --git a/src/guides/v2.4/graphql/queries/customer.md b/src/guides/v2.4/graphql/queries/customer.md index 05273266440..409cf43432e 100644 --- a/src/guides/v2.4/graphql/queries/customer.md +++ b/src/guides/v2.4/graphql/queries/customer.md @@ -479,7 +479,7 @@ query { ``` ### Retrieve the customer's wish list -The following query returns the customer's wish list: +The following query returns the customer's wish lists. {{site.data.var.ee}} allows customers to have multiple wish lists. **Request:** @@ -487,18 +487,16 @@ The following query returns the customer's wish list: { customer { wishlists { + id + name + items_count items_v2 { - id - description - product { - sku - name - price_range { - maximum_price { - regular_price { - value - } - } + items { + id + product { + uid + name + sku } } } @@ -516,225 +514,141 @@ The following query returns the customer's wish list: "wishlists": [ { "id": "1", - "items_v2": [ - { - "id": "1", - "description": null, - "quantity": 1, - "product": { - "sku": "24-WB07", - "name": "Overnight Duffle", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 45 - } - } + "name": "Vacation Wants", + "items_count": 10, + "items_v2": { + "items": [ + { + "id": "1", + "product": { + "uid": "MTM=", + "name": "Overnight Duffle", + "sku": "24-WB07" } - } - }, - { - "id": "2", - "description": null, - "quantity": 1, - "product": { - "sku": "24-WB05", - "name": "Savvy Shoulder Tote", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 32 - } - } + }, + { + "id": "2", + "product": { + "uid": "MTA=", + "name": "Savvy Shoulder Tote", + "sku": "24-WB05" } - } - }, - { - "id": "3", - "description": null, - "quantity": 1, - "product": { - "sku": "24-WB06", - "name": "Endeavor Daytrip Backpack", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 33 - } - } + }, + { + "id": "3", + "product": { + "uid": "MTE=", + "name": "Endeavor Daytrip Backpack", + "sku": "24-WB06" } - } - }, - { - "id": "4", - "description": null, - "quantity": 1, - "product": { - "sku": "WH04", - "name": "Miko Pullover Hoodie", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 69 - } - } + }, + { + "id": "4", + "product": { + "uid": "MTA5OA==", + "name": "Miko Pullover Hoodie", + "sku": "WH04" } - } - }, - { - "id": "5", - "description": null, - "quantity": 1, - "product": { - "sku": "WJ01", - "name": "Stellar Solar Jacket", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 75 - } - } + }, + { + "id": "5", + "product": { + "uid": "MTIyNg==", + "name": "Stellar Solar Jacket", + "sku": "WJ01" } - } - }, - { - "id": "6", - "description": null, - "quantity": 1, - "product": { - "sku": "WT03", - "name": "Nora Practice Tank", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 39 - } - } + }, + { + "id": "6", + "product": { + "uid": "MTcyMg==", + "name": "Nora Practice Tank", + "sku": "WT03" } - } - }, - { - "id": "7", - "description": null, - "quantity": 1, - "product": { - "sku": "WT01", - "name": "Bella Tank", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 29 - } - } + }, + { + "id": "7", + "product": { + "uid": "MTY5MA==", + "name": "Bella Tank", + "sku": "WT01" + } + }, + { + "id": "17", + "product": { + "uid": "MTg=", + "name": "Pursuit Lumaflex™ Tone Band", + "sku": "24-UG02" + } + }, + { + "id": "18", + "product": { + "uid": "MQ==", + "name": "Joust Duffle Bag", + "sku": "24-MB01" + } + }, + { + "id": "20", + "product": { + "uid": "NTI=", + "name": "Sprite Yoga Companion Kit", + "sku": "24-WG080" } } - } - ], - "items_count": 7, - "sharing_code": "4fAZAjxZJJ2UQdtPE1nsiQkTqaqICw2x" + ] + } }, { "id": "2", - "items_v2": [ - { - "id": "8", - "description": null, - "quantity": 1, - "product": { - "sku": "240-LV08", - "name": "Advanced Pilates & Yoga (Strength)", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 18 - } - } - } - } - }, - { - "id": "9", - "description": null, - "quantity": 1, - "product": { - "sku": "24-UG02", - "name": "Pursuit Lumaflex™ Tone Band", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 16 - } - } + "name": "Lose the Muffintop", + "items_count": 5, + "items_v2": { + "items": [ + { + "id": "8", + "product": { + "uid": "NDk=", + "name": "Advanced Pilates & Yoga (Strength)", + "sku": "240-LV08" } - } - }, - { - "id": "10", - "description": null, - "quantity": 1, - "product": { - "sku": "WS04", - "name": "Layla Tee", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 29 - } - } + }, + { + "id": "10", + "product": { + "uid": "MTQ1MA==", + "name": "Layla Tee", + "sku": "WS04" } - } - }, - { - "id": "11", - "description": null, - "quantity": 1, - "product": { - "sku": "WS12", - "name": "Radiant Tee", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 22 - } - } + }, + { + "id": "11", + "product": { + "uid": "MTU2Mg==", + "name": "Radiant Tee", + "sku": "WS12" } - } - }, - { - "id": "12", - "description": null, - "quantity": 1, - "product": { - "sku": "WB01", - "name": "Electra Bra Top", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 39 - } - } + }, + { + "id": "12", + "product": { + "uid": "MTYxMA==", + "name": "Electra Bra Top", + "sku": "WB01" } - } - }, - { - "id": "13", - "description": null, - "quantity": 1, - "product": { - "sku": "WB03", - "name": "Celeste Sports Bra", - "price_range": { - "maximum_price": { - "regular_price": { - "value": 39 - } - } + }, + { + "id": "13", + "product": { + "uid": "MTY0Mg==", + "name": "Celeste Sports Bra", + "sku": "WB03" } } - } - ], - "items_count": 6, - "sharing_code": "yvZFq8xifW8iur20MRA59rsTjKPuSXht" + ] + } } ] } diff --git a/src/guides/v2.4/release-notes/commerce-2-4-2.md b/src/guides/v2.4/release-notes/commerce-2-4-2.md index cb28e661b97..c996893f273 100644 --- a/src/guides/v2.4/release-notes/commerce-2-4-2.md +++ b/src/guides/v2.4/release-notes/commerce-2-4-2.md @@ -88,7 +88,7 @@ This release adds GraphQL coverage for the following features: * Added the `staging` attribute to the [`ProductInterface`]({{ page.baseurl }}/graphql/interfaces/product-interface.html) and [`CategoryInterface`]({{ page.baseurl }}/graphql/interfaces/category-interface.html) to determine if a product is staged and to view its associated campaign information. -* Added support for multiple wish lists. You can use GraphQL to [create]({{ page.baseurl }}/graphql/mutations/create-wishlist.html), [delete]({{ page.baseurl }}/graphql/mutations/delete-wishlist.html), and [rename]({{ page.baseurl }}/graphql/mutations/update-wishlist.html) wish lists as well as [move]({{ page.baseurl }}/graphql/mutations/move-products-to-wishlist.html) or [copy]({{ page.baseurl }}/graphql/mutations/copy-products-to-wishlist.html) items between them. +* Added support for multiple wish lists. You can use GraphQL to [create]({{ page.baseurl }}/graphql/mutations/create-wishlist.html), [delete]({{ page.baseurl }}/graphql/mutations/delete-wishlist.html), and [rename]({{ page.baseurl }}/graphql/mutations/update-wishlist.html) wish lists as well as [move]({{ page.baseurl }}/graphql/mutations/move-products-between-wishlists.html) or [copy]({{ page.baseurl }}/graphql/mutations/copy-products-between-wishlists.html) items between them. * Added support for returned merchandise authorizations (RMA)