@@ -7,15 +7,48 @@ type Query {
7
7
8
8
type Mutation {
9
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
- applyCouponToCart (input : ApplyCouponToCartInput ): ApplyCouponToCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ Coupon\\ ApplyCouponToCart" )
11
- removeCouponFromCart (input : RemoveCouponFromCartInput ): RemoveCouponFromCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ Coupon\\ RemoveCouponFromCart" )
12
- setShippingAddressesOnCart (input : SetShippingAddressesOnCartInput ): SetShippingAddressesOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetShippingAddressesOnCart" )
10
+ addSimpleProductsToCart (input : AddSimpleProductsToCartInput ): AddSimpleProductsToCartOutput @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ AddSimpleProductsToCart" )
11
+ addVirtualProductsToCart (input : AddVirtualProductsToCartInput ): AddVirtualProductsToCartOutput @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ AddSimpleProductsToCart" )
13
12
applyCouponToCart (input : ApplyCouponToCartInput ): ApplyCouponToCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ ApplyCouponToCart" )
14
13
removeCouponFromCart (input : RemoveCouponFromCartInput ): RemoveCouponFromCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ RemoveCouponFromCart" )
14
+ setShippingAddressesOnCart (input : SetShippingAddressesOnCartInput ): SetShippingAddressesOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetShippingAddressesOnCart" )
15
15
setBillingAddressOnCart (input : SetBillingAddressOnCartInput ): SetBillingAddressOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetBillingAddressOnCart" )
16
16
setShippingMethodsOnCart (input : SetShippingMethodsOnCartInput ): SetShippingMethodsOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetShippingMethodsOnCart" )
17
- addSimpleProductsToCart (input : AddSimpleProductsToCartInput ): AddSimpleProductsToCartOutput @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ AddSimpleProductsToCart" )
18
- addVirtualProductsToCart (input : AddVirtualProductsToCartInput ): AddVirtualProductsToCartOutput @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ AddSimpleProductsToCart" )
17
+ }
18
+
19
+ input AddSimpleProductsToCartInput {
20
+ cart_id : String !
21
+ cartItems : [SimpleProductCartItemInput ! ]!
22
+ }
23
+
24
+ input SimpleProductCartItemInput {
25
+ data : CartItemInput !
26
+ customizable_options :[CustomizableOptionInput ! ]
27
+ }
28
+
29
+ input AddVirtualProductsToCartInput {
30
+ cart_id : String !
31
+ cartItems : [VirtualProductCartItemInput ! ]!
32
+ }
33
+
34
+ input VirtualProductCartItemInput {
35
+ data : CartItemInput !
36
+ customizable_options :[CustomizableOptionInput ! ]
37
+ }
38
+
39
+ input CartItemInput {
40
+ sku : String !
41
+ qty : Float !
42
+ }
43
+
44
+ input CustomizableOptionInput {
45
+ id : Int !
46
+ value : String !
47
+ }
48
+
49
+ input ApplyCouponToCartInput {
50
+ cart_id : String !
51
+ coupon_code : String !
19
52
}
20
53
21
54
input SetShippingAddressesOnCartInput {
@@ -24,7 +57,7 @@ input SetShippingAddressesOnCartInput {
24
57
}
25
58
26
59
input ShippingAddressInput {
27
- customer_address_id : Int # Can be provided in one-page checkout and is required for multi-shipping checkout
60
+ customer_address_id : Int # If provided then will be used address from address book
28
61
address : CartAddressInput
29
62
cart_items : [CartItemQuantityInput ! ]
30
63
}
@@ -81,19 +114,6 @@ type SetShippingMethodsOnCartOutput {
81
114
cart : Cart !
82
115
}
83
116
84
- # If no address is provided, the system get address assigned to a quote
85
- # If there's no address at all - the system returns all shipping methods
86
- input AvailableShippingMethodsOnCartInput {
87
- cart_id : String !
88
- customer_address_id : Int
89
- address : CartAddressInput
90
- }
91
-
92
- input ApplyCouponToCartInput {
93
- cart_id : String !
94
- coupon_code : String !
95
- }
96
-
97
117
type ApplyCouponToCartOutput {
98
118
cart : Cart !
99
119
}
@@ -172,31 +192,6 @@ type RemoveCouponFromCartOutput {
172
192
cart : Cart
173
193
}
174
194
175
- input AddSimpleProductsToCartInput {
176
- cart_id : String !
177
- cartItems : [SimpleProductCartItemInput ! ]!
178
- }
179
-
180
- input AddVirtualProductsToCartInput {
181
- cart_id : String !
182
- cartItems : [VirtualProductCartItemInput ! ]!
183
- }
184
-
185
- input SimpleProductCartItemInput {
186
- data : CartItemInput !
187
- customizable_options :[CustomizableOptionInput ! ]
188
- }
189
-
190
- input VirtualProductCartItemInput {
191
- data : CartItemInput !
192
- customizable_options :[CustomizableOptionInput ! ]
193
- }
194
-
195
- input CustomizableOptionInput {
196
- id : Int !
197
- value : String !
198
- }
199
-
200
195
type AddSimpleProductsToCartOutput {
201
196
cart : Cart !
202
197
}
@@ -213,11 +208,6 @@ type VirtualCartItem implements CartItemInterface @doc(description: "Virtual Car
213
208
customizable_options : [SelectedCustomizableOption ] @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CustomizableOptions" )
214
209
}
215
210
216
- input CartItemInput {
217
- sku : String !
218
- qty : Float !
219
- }
220
-
221
211
interface CartItemInterface @typeResolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CartItemTypeResolver" ) {
222
212
id : String !
223
213
qty : Float !
@@ -246,8 +236,3 @@ type CartItemSelectedOptionValuePrice {
246
236
units : String !
247
237
type : PriceTypeEnum !
248
238
}
249
-
250
- input CartItemDetailsInput {
251
- sku : String !
252
- qty : Float !
253
- }
0 commit comments