|
2 | 2 | # See COPYING.txt for license details.
|
3 | 3 |
|
4 | 4 | type ComparableItem {
|
5 |
| - uid: ID! |
| 5 | + uid: ID! @doc(description: "The unique ID of an item in a compare list") |
6 | 6 | product: ProductInterface!
|
7 |
| - attributes: [ProductAttribute]! @doc(description: "Product comparable attributes") |
| 7 | + attributes: [ProductAttribute]! @doc(description: "An array of product attributes that can be used to compare products") |
8 | 8 | }
|
9 | 9 |
|
10 | 10 | type ProductAttribute {
|
11 |
| - code: String! @doc(description:"Attribute code") |
12 |
| - value: String! @doc(description:"Attribute display value") |
| 11 | + code: String! @doc(description: "The unique identifier for a product attribute code.") |
| 12 | + value: String! @doc(description:"The display value of the attribute") |
13 | 13 | }
|
14 | 14 |
|
15 | 15 | type ComparableAttribute {
|
16 |
| - code: String! @doc(description: "Attribute code") |
17 |
| - label: String! @doc(description: "Attribute label") |
| 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 | 20 | type CompareList {
|
21 |
| - uid: ID! @doc(description: "Compare list id") |
22 |
| - items: [ComparableItem] @doc(description: "Comparable products") |
23 |
| - attributes: [ComparableAttribute] @doc(description: "Comparable attributes, provides codes and titles for the attributes") |
| 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 | 24 | item_count: Int!
|
25 | 25 | }
|
26 | 26 |
|
27 | 27 | type Customer {
|
28 |
| - compare_list: CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\CustomerCompareList") @doc(description: "Active customers 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: "Compare list") |
| 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") |
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. For a logged in user, the created list is assigned to the user") |
37 |
| - addProductsToCompareList(input: AddProductsToCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AddProductsToCompareList") @doc(description: "Add products to compare list") |
38 |
| - removeProductsFromCompareList(input: RemoveProductsFromCompareListInput): CompareList @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\RemoveProductsFromCompareList") @doc(description: "Remove products from compare list") |
| 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 | 39 | assignCompareListToCustomer(uid: ID!): AssignCompareListToCustomerOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\AssignCompareListToCustomer") @doc(description: "Assign compare list to customer")
|
40 |
| - deleteCompareList(uid: ID!): DeleteCompareListOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\DeleteCompareList") @doc(description: "Delete compare list") |
| 40 | + deleteCompareList(uid: ID!): DeleteCompareListOutput @resolver(class: "\\Magento\\CompareListGraphQl\\Model\\Resolver\\DeleteCompareList") @doc(description: "Delete the specified compare list") |
41 | 41 | }
|
42 | 42 |
|
43 | 43 | input CreateCompareListInput {
|
44 |
| - products: [ID!] |
| 44 | + products: [ID!] @doc(description: "An array of product IDs to add to the compare list") |
45 | 45 | }
|
46 | 46 |
|
47 | 47 | input AddProductsToCompareListInput {
|
48 |
| - uid: ID!, |
49 |
| - products: [ID!]! |
| 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 | 52 | input RemoveProductsFromCompareListInput {
|
53 |
| - uid: ID!, |
54 |
| - products: [ID!]! |
| 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 | 57 | type DeleteCompareListOutput {
|
58 |
| - result: Boolean! |
| 58 | + result: Boolean! @doc(description: "Indicates whether the compare list was successfully deleted") |
59 | 59 | }
|
60 | 60 |
|
61 | 61 | type AssignCompareListToCustomerOutput {
|
|
0 commit comments