Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion design-documents/graph-ql/coverage/cart/Cart.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ type CartQueryOutput {
type Cart {
id: ID! @doc(description: "The ID of the cart.") @deprecated(reason: "use uid")
uid: ID! @doc(description: "The unique ID of the cart.")
items: [CartItemInterface]
items: [CartItemInterface] @deprecated(reason: "The `items` field is deprecated. Use `items_v2` instead.")
items_v2(
currentPage: Int = 1 @doc(description: "current page of the customer cart items. default is 1")
pageSize: Int = 20 @doc(description: "page size for the customer cart items. default is 20")
): CartItems! @doc(description: "Cart items")
applied_coupons: [AppliedCoupon] @doc(description:"An array of `AppliedCoupon` objects. Each object contains the `code` text attribute, which specifies the coupon code. By default Magento supports only one coupon.")
email: String
shipping_addresses: [ShippingCartAddress]!
Expand All @@ -25,6 +29,12 @@ type Cart {
is_virtual: Boolean!
}

type CartItems {
items: [CartItemInterface]! @doc(description: "Cart items list")
page_info: SearchResultPageInfo
total_count: Int!
}

type AvailablePaymentMethod {
code: String! @doc(description: "The payment method code")
title: String! @doc(description: "The payment method title.")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
type Customer {
addresses: CustomerAddresses @deprecated(reason: "The `address` field is deprecated. Use `addresses_v2` instead.")
addresses_v2(
currentPage: Int = 1 @doc(description: "current page of the customer address list. default is 1")
pageSize: Int = 10 @doc(description: "page size for the customer address list. default is 10")
): CustomerAddresses
}

type CustomerAddresses {
items: [CustomerAddress]! @doc(description: "List of customer address")
page_info: SearchResultPageInfo
total_count: Int!
}
14 changes: 12 additions & 2 deletions design-documents/graph-ql/coverage/customer/Wishlist.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,24 @@ type Customer {

type Wishlist {
id: ID
items: [WishlistItem] @deprecated(reason: "Use field `items_v2` from type `Wishlist` instead")
items_v2: [WishlistItemInterface] @doc(description: "An array of items in the customer's wishlist")
items: [WishlistItem] @deprecated(reason: "Use field `items_v3` from type `Wishlist` instead")
items_v2: [WishlistItemInterface] @doc(description: "An array of items in the customer's wishlist") @deprecated(reason: "Use field `items_v3` from type `Wishlist` instead")
items_v3(
currentPage: Int = 1 @doc(description: "current page of the customer wishlist items. default is 1")
pageSize: Int = 20 @doc(description: "page size for the customer wishlist items. default is 20")
): WishlistItems @doc(description: "An array of items in the customer's wishlist")
items_count: Int
sharing_code: String
updated_at: String
name: String @doc(description: "Avaialble in Commerce edition only")
}

type WishlistItems {
items: [WishlistItemInterface]
page_info: SearchResultPageInfo
total_count: Int
}

input WishlistItemUpdateInput {
wishlist_item_id: ID
quantity: Float
Expand Down
17 changes: 16 additions & 1 deletion design-documents/graph-ql/coverage/customer/customer-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ type CustomerOrder {
order_date: String! @doc("date when the order was placed")
status: String! @doc("current status of the order")
number: String! @doc("sequential order number")
items: [OrderItemInterface] @doc("collection of all the items purchased")
items: [OrderItemInterface] @doc("collection of all the items purchased") @deprecated("The `items` field is derecated. Use `items_v2` instead.")
items_v2(
currentPage: Int = 1 @doc("current page of the customer order item list. default is 1")
pageSize: Int = 20 @doc("page size for the customer orders item list. default is 20")
): OrderItems! @doc("Collection of all of the purchased items")
total: OrderTotal @doc("total amount details for the order")
invoices: [Invoice] @doc("invoice list for the order")
credit_memos: [CreditMemo] @doc("credit memo list for the order")
Expand All @@ -86,6 +90,17 @@ The `id` will be a `base64_encode(increment_id)` which in future can be replaced
> The order `status` should be filtered in the same way as for Luma via `Order Status` and `Visible On Storefront` configuration

### Order Item
The order items will be presented as separate interface which will have multiple implementations for invoice, shipment and credit memo types.
The order items will be paginated.

```graphql
@doc("Grpahql Order Item Output Wrapper")
type OrderItems {
items: [OrderItem]! @doc("List of orders items")
page_info: SearchResultPageInfo
total_count: Int!
}
```

```graphql
interface OrderItemInterface @doc("Order item details") {
Expand Down