Skip to content

Commit 11c77ca

Browse files
committed
Merge remote-tracking branch 'origin/DOC-473' into graphql-doc-changes
2 parents 2a768b8 + a89a74a commit 11c77ca

File tree

9 files changed

+694
-694
lines changed

9 files changed

+694
-694
lines changed
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
33

4-
type ComparableItem {
5-
uid: ID! @doc(description: "The unique ID of an item in a compare list")
6-
product: ProductInterface! @doc(description: "Contains details about a product in a compare list")
7-
attributes: [ProductAttribute]! @doc(description: "An array of product attributes that can be used to compare products")
4+
type ComparableItem @doc(description: "Defines an object used to iterate through items for product comparisons.") {
5+
uid: ID! @doc(description: "The unique ID of an item in a compare list.")
6+
product: ProductInterface! @doc(description: "Details about a product in a compare list.")
7+
attributes: [ProductAttribute]! @doc(description: "An array of product attributes that can be used to compare products.")
88
}
99

10-
type ProductAttribute {
10+
type ProductAttribute @doc(description: "Contains a product attribute code and value.") {
1111
code: String! @doc(description: "The unique identifier for a product attribute code.")
12-
value: String! @doc(description:"The display value of the attribute")
12+
value: String! @doc(description:"The display value of the attribute.")
1313
}
1414

15-
type ComparableAttribute {
16-
code: String! @doc(description: "An attribute code that is enabled for product comparisons")
17-
label: String! @doc(description: "The label of the attribute code")
15+
type ComparableAttribute @doc(description: "Contains an attribute code that is used for product comparisons.") {
16+
code: String! @doc(description: "An attribute code that is enabled for product comparisons.")
17+
label: String! @doc(description: "The label of the attribute code.")
1818
}
1919

20-
type CompareList {
21-
uid: ID! @doc(description: "The unique ID assigned to the compare list")
22-
items: [ComparableItem] @doc(description: "An array of products to compare")
23-
attributes: [ComparableAttribute] @doc(description: "An array of attributes that can be used for comparing products")
24-
item_count: Int! @doc(description: "The number of items in the compare list")
20+
type CompareList @doc(description: "Contains iterable information such as the array of items, the count, and attributes that represent the compare list.") {
21+
uid: ID! @doc(description: "The unique ID assigned to the compare list.")
22+
items: [ComparableItem] @doc(description: "An array of products to compare.")
23+
attributes: [ComparableAttribute] @doc(description: "An array of attributes that can be used for comparing products.")
24+
item_count: Int! @doc(description: "The number of items in the compare list.")
2525
}
2626

2727
type Customer {
28-
compare_list: CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CustomerCompareList") @doc(description: "The contents of the customer's compare list")
28+
compare_list: CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CustomerCompareList") @doc(description: "The contents of the customer's compare list.")
2929
}
3030

3131
type Query {
32-
compareList(uid: ID!): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CompareList") @doc(description: "Return products that have been added to the specified compare list")
32+
compareList(uid: ID! @doc(description: "The unique ID of the compare list to be queried.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CompareList") @doc(description: "Return products that have been added to the specified compare list.")
3333
}
3434

3535
type Mutation {
36-
createCompareList(input: CreateCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CreateCompareList") @doc(description: "Creates a new compare list. The compare list is saved for logged in customers")
37-
addProductsToCompareList(input: AddProductsToCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AddProductsToCompareList") @doc(description: "Add products to the specified compare list")
38-
removeProductsFromCompareList(input: RemoveProductsFromCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\RemoveProductsFromCompareList") @doc(description: "Remove products from the specified compare list")
39-
assignCompareListToCustomer(uid: ID!): AssignCompareListToCustomerOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AssignCompareListToCustomer") @doc(description: "Assign the specified compare list to the logged in customer")
40-
deleteCompareList(uid: ID!): DeleteCompareListOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\DeleteCompareList") @doc(description: "Delete the specified compare list")
36+
createCompareList(input: CreateCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CreateCompareList") @doc(description: "Create a new compare list. The compare list is saved for logged in customers.")
37+
addProductsToCompareList(input: AddProductsToCompareListInput @doc(description: "An input object that defines which products to add to an existing compare list.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AddProductsToCompareList") @doc(description: "Add products to the specified compare list.")
38+
removeProductsFromCompareList(input: RemoveProductsFromCompareListInput @doc(description: "An input object that defines which products to remove from a compare list.")): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\RemoveProductsFromCompareList") @doc(description: "Remove products from the specified compare list.")
39+
assignCompareListToCustomer(uid: ID! @doc(description: "The unique ID of the compare list to be assigned.")): AssignCompareListToCustomerOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AssignCompareListToCustomer") @doc(description: "Assign the specified compare list to the logged in customer.")
40+
deleteCompareList(uid: ID! @doc(description: "The unique ID of the compare list to be deleted.")): DeleteCompareListOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\DeleteCompareList") @doc(description: "Delete the specified compare list.")
4141
}
4242

43-
input CreateCompareListInput {
44-
products: [ID!] @doc(description: "An array of product IDs to add to the compare list")
43+
input CreateCompareListInput @doc(description: "Contains an array of product IDs to use for creating a compare list.") {
44+
products: [ID!] @doc(description: "An array of product IDs to add to the compare list.")
4545
}
4646

47-
input AddProductsToCompareListInput {
48-
uid: ID!, @doc(description: "The unique identifier of the compare list to modify")
49-
products: [ID!]! @doc(description: "An array of product IDs to add to the compare list")
47+
input AddProductsToCompareListInput @doc(description: "Contains products to add to an existing compare list.") {
48+
uid: ID!, @doc(description: "The unique identifier of the compare list to modify.")
49+
products: [ID!]! @doc(description: "An array of product IDs to add to the compare list.")
5050
}
5151

52-
input RemoveProductsFromCompareListInput {
53-
uid: ID!, @doc(description: "The unique identifier of the compare list to modify")
54-
products: [ID!]! @doc(description: "An array of product IDs to remove from the compare list")
52+
input RemoveProductsFromCompareListInput @doc(description: "Defines which products to remove from a compare list.") {
53+
uid: ID!, @doc(description: "The unique identifier of the compare list to modify.")
54+
products: [ID!]! @doc(description: "An array of product IDs to remove from the compare list.")
5555
}
5656

57-
type DeleteCompareListOutput {
58-
result: Boolean! @doc(description: "Indicates whether the compare list was successfully deleted")
57+
type DeleteCompareListOutput @doc(description: "Contains the results of the request to delete a compare list.") {
58+
result: Boolean! @doc(description: "Indicates whether the compare list was successfully deleted.")
5959
}
6060

61-
type AssignCompareListToCustomerOutput {
62-
result: Boolean!
63-
compare_list: CompareList @doc(description: "The contents of the customer's compare list")
61+
type AssignCompareListToCustomerOutput @doc(description: "Contains the results of the request to assign a compare list.") {
62+
result: Boolean! @doc(description: "Indicates whether the compare list was successfully assigned to the customer.")
63+
compare_list: CompareList @doc(description: "The contents of the customer's compare list.")
6464
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# See COPYING.txt for license details.
33

44
type Query {
5-
customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\CustomerDownloadableGraphQl\\Model\\Resolver\\CustomerDownloadableProducts") @doc(description: "The query returns the contents of a customer's downloadable products") @cache(cacheable: false)
5+
customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\CustomerDownloadableGraphQl\\Model\\Resolver\\CustomerDownloadableProducts") @doc(description: "Return a list of downloadable products the customer has purchased.") @cache(cacheable: false)
66
}
77

8-
type CustomerDownloadableProducts {
9-
items: [CustomerDownloadableProduct] @doc(description: "List of purchased downloadable items")
8+
type CustomerDownloadableProducts @doc(description: "Contains a list of downloadable products.") {
9+
items: [CustomerDownloadableProduct] @doc(description: "An array of purchased downloadable items.")
1010
}
1111

12-
type CustomerDownloadableProduct {
13-
order_increment_id: String
14-
date: String
15-
status: String
16-
download_url: String
17-
remaining_downloads: String
12+
type CustomerDownloadableProduct @doc(description: "Contains details about a single downloadable product.") {
13+
order_increment_id: String @doc(description: "The unique ID assigned to the item.")
14+
date: String @doc(description: "The date and time the purchase was made.")
15+
status: String @doc(description: "Indicates when the product becomes available for download. Options are `Pending` and `Invoiced`.")
16+
download_url: String @doc(description: "The fully qualified URL to the download file.")
17+
remaining_downloads: String @doc(description: "The remaining number of times the customer can download the product.")
1818
}

0 commit comments

Comments
 (0)