|
1 | 1 | # Copyright © Magento, Inc. All rights reserved.
|
2 | 2 | # See COPYING.txt for license details.
|
3 | 3 |
|
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.") |
8 | 8 | }
|
9 | 9 |
|
10 |
| -type ProductAttribute { |
| 10 | +type ProductAttribute @doc(description: "Contains a product attribute code and value.") { |
11 | 11 | 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.") |
13 | 13 | }
|
14 | 14 |
|
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.") |
18 | 18 | }
|
19 | 19 |
|
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.") |
25 | 25 | }
|
26 | 26 |
|
27 | 27 | 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.") |
29 | 29 | }
|
30 | 30 |
|
31 | 31 | 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.") |
33 | 33 | }
|
34 | 34 |
|
35 | 35 | 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.") |
41 | 41 | }
|
42 | 42 |
|
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.") |
45 | 45 | }
|
46 | 46 |
|
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.") |
50 | 50 | }
|
51 | 51 |
|
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.") |
55 | 55 | }
|
56 | 56 |
|
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.") |
59 | 59 | }
|
60 | 60 |
|
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.") |
64 | 64 | }
|
0 commit comments