|
1 | 1 | # Copyright © Magento, Inc. All rights reserved.
|
2 | 2 | # See COPYING.txt for license details.
|
3 | 3 |
|
4 |
| -type Query { |
5 |
| - cart(cart_id: String!): Cart @resolver (class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\Cart") @doc(description:"Returns information about shopping cart") |
6 |
| -} |
7 |
| - |
8 | 4 | type Mutation {
|
9 |
| - createEmptyCart: String @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\CreateEmptyCart") @doc(description:"Creates an empty shopping cart for a guest or logged in user") |
10 |
| - setShippingAddressesOnCart(input: SetShippingAddressesOnCartInput): SetShippingAddressesOnCartOutput @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\SetShippingAddressesOnCart") |
11 |
| - applyCouponToCart(input: ApplyCouponToCartInput): ApplyCouponToCartOutput @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\ApplyCouponToCart") |
12 |
| - removeCouponFromCart(input: RemoveCouponFromCartInput): RemoveCouponFromCartOutput @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\RemoveCouponFromCart") |
13 |
| - setBillingAddressOnCart(input: SetBillingAddressOnCartInput): SetBillingAddressOnCartOutput @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\SetBillingAddressOnCart") |
14 |
| - setShippingMethodsOnCart(input: SetShippingMethodsOnCartInput): SetShippingMethodsOnCartOutput @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\SetShippingMethodsOnCart") |
15 |
| - addSimpleProductsToCart(input: AddSimpleProductsToCartInput): AddSimpleProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart") |
16 |
| -} |
17 |
| - |
18 |
| -input SetShippingAddressesOnCartInput { |
19 |
| - cart_id: String! |
20 |
| - shipping_addresses: [ShippingAddressInput!]! |
21 |
| -} |
22 |
| - |
23 |
| -input ShippingAddressInput { |
24 |
| - customer_address_id: Int # Can be provided in one-page checkout and is required for multi-shipping checkout |
25 |
| - address: CartAddressInput |
26 |
| - cart_items: [CartItemQuantityInput!] |
27 |
| -} |
28 |
| - |
29 |
| -input CartItemQuantityInput { |
30 |
| - cart_item_id: Int! |
31 |
| - quantity: Float! |
32 |
| -} |
33 |
| - |
34 |
| -input SetBillingAddressOnCartInput { |
35 |
| - cart_id: String! |
36 |
| - billing_address: BillingAddressInput! |
37 |
| -} |
38 |
| - |
39 |
| -input BillingAddressInput { |
40 |
| - customer_address_id: Int |
41 |
| - address: CartAddressInput |
42 |
| - use_for_shipping: Boolean |
43 |
| -} |
44 |
| - |
45 |
| -input CartAddressInput { |
46 |
| - firstname: String! |
47 |
| - lastname: String! |
48 |
| - company: String |
49 |
| - street: [String!]! |
50 |
| - city: String! |
51 |
| - region: String |
52 |
| - postcode: String |
53 |
| - country_code: String! |
54 |
| - telephone: String! |
55 |
| - save_in_address_book: Boolean! |
56 |
| -} |
57 |
| - |
58 |
| -input SetShippingMethodsOnCartInput { |
59 |
| - cart_id: String! |
60 |
| - shipping_methods: [ShippingMethodForAddressInput!]! |
61 |
| -} |
62 |
| - |
63 |
| -input ShippingMethodForAddressInput { |
64 |
| - cart_address_id: Int! |
65 |
| - carrier_code: String! |
66 |
| - method_code: String! |
67 |
| -} |
68 |
| - |
69 |
| -type SetBillingAddressOnCartOutput { |
70 |
| - cart: Cart! |
71 |
| -} |
72 |
| - |
73 |
| -type SetShippingAddressesOnCartOutput { |
74 |
| - cart: Cart! |
75 |
| -} |
76 |
| - |
77 |
| -type SetShippingMethodsOnCartOutput { |
78 |
| - cart: Cart! |
79 |
| -} |
80 |
| - |
81 |
| -input ApplyCouponToCartInput { |
82 |
| - cart_id: String! |
83 |
| - coupon_code: String! |
84 |
| -} |
85 |
| - |
86 |
| -type ApplyCouponToCartOutput { |
87 |
| - cart: Cart! |
88 |
| -} |
89 |
| - |
90 |
| -type Cart { |
91 |
| - items: [CartItemInterface] |
92 |
| - applied_coupon: AppliedCoupon |
93 |
| - shipping_addresses: [CartAddress]! @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\ShippingAddresses") |
94 |
| - billing_address: CartAddress! @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\BillingAddress") |
95 |
| -} |
96 |
| - |
97 |
| -type CartAddress { |
98 |
| - firstname: String |
99 |
| - lastname: String |
100 |
| - company: String |
101 |
| - street: [String] |
102 |
| - city: String |
103 |
| - region: CartAddressRegion |
104 |
| - postcode: String |
105 |
| - country: CartAddressCountry |
106 |
| - telephone: String |
107 |
| - address_type: AdressTypeEnum |
108 |
| - items_weight: Float |
109 |
| - customer_notes: String |
110 |
| - cart_items: [CartItemQuantity] |
111 |
| -} |
112 |
| - |
113 |
| -type CartItemQuantity { |
114 |
| - cart_item_id: Int! |
115 |
| - quantity: Float! |
116 |
| -} |
117 |
| - |
118 |
| -type CartAddressRegion { |
119 |
| - code: String |
120 |
| - label: String |
121 |
| -} |
122 |
| - |
123 |
| -type CartAddressCountry { |
124 |
| - code: String |
125 |
| - label: String |
126 |
| -} |
127 |
| - |
128 |
| -type SelectedShippingMethod { |
129 |
| - amount: Float! |
130 |
| -} |
131 |
| - |
132 |
| -type AvailableShippingMethod { |
133 |
| - carrier_code: String! |
134 |
| - carrier_title: String! |
135 |
| - method_code: String! |
136 |
| - method_title: String! |
137 |
| - amount: Float! |
138 |
| -} |
139 |
| - |
140 |
| -enum AdressTypeEnum { |
141 |
| - SHIPPING |
142 |
| - BILLING |
143 |
| -} |
144 |
| - |
145 |
| -type AppliedCoupon { |
146 |
| - code: String! |
147 |
| -} |
148 |
| - |
149 |
| -input RemoveCouponFromCartInput { |
150 |
| - cart_id: String! |
151 |
| -} |
152 |
| - |
153 |
| -type RemoveCouponFromCartOutput { |
154 |
| - cart: Cart |
155 |
| -} |
156 |
| - |
157 |
| -input AddSimpleProductsToCartInput { |
158 |
| - cart_id: String! |
159 |
| - cartItems: [SimpleProductCartItemInput!]! |
160 |
| -} |
161 |
| - |
162 |
| -input SimpleProductCartItemInput { |
163 |
| - data: CartItemInput! |
164 |
| - customizable_options:[CustomizableOptionInput!] |
165 |
| -} |
166 |
| - |
167 |
| -input CustomizableOptionInput { |
168 |
| - id: Int! |
169 |
| - value: String! |
170 |
| -} |
171 |
| - |
172 |
| -type AddSimpleProductsToCartOutput { |
173 |
| - cart: Cart! |
174 |
| -} |
175 |
| - |
176 |
| -type SimpleCartItem implements CartItemInterface @doc(description: "Simple Cart Item") { |
177 |
| - customizable_options: [SelectedCustomizableOption] @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\CustomizableOptions") |
178 |
| -} |
179 |
| - |
180 |
| -input CartItemInput { |
181 |
| - sku: String! |
182 |
| - qty: Float! |
183 |
| -} |
184 |
| - |
185 |
| -interface CartItemInterface @typeResolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\CartItemTypeResolver") { |
186 |
| - id: String! |
187 |
| - qty: Float! |
188 |
| - product: ProductInterface! |
189 |
| -} |
190 |
| - |
191 |
| -type SelectedCustomizableOption { |
192 |
| - id: Int! |
193 |
| - label: String! |
194 |
| - type: String! |
195 |
| - is_required: Int! |
196 |
| - values: [SelectedCustomizableOptionValue!]! |
197 |
| - sort_order: Int! |
198 |
| -} |
199 |
| - |
200 |
| -type SelectedCustomizableOptionValue { |
201 |
| - id: Int! |
202 |
| - label: String! |
203 |
| - value: String! |
204 |
| - price: CartItemSelectedOptionValuePrice! |
205 |
| - sort_order: Int! |
206 |
| -} |
207 |
| - |
208 |
| -type CartItemSelectedOptionValuePrice { |
209 |
| - value: Float! |
210 |
| - units: String! |
211 |
| - type: PriceTypeEnum! |
| 5 | + createEmptyCart: String @resolver(class: "\\Magento\\QuoteGraphQl\\Model\\Resolver\\CreateEmptyCart") @doc(description:"Creates empty shopping cart for guest or logged in user") |
212 | 6 | }
|
0 commit comments