@@ -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
}
@@ -178,31 +198,6 @@ type RemoveCouponFromCartOutput {
178
198
cart : Cart
179
199
}
180
200
181
- input AddSimpleProductsToCartInput {
182
- cart_id : String !
183
- cartItems : [SimpleProductCartItemInput ! ]!
184
- }
185
-
186
- input AddVirtualProductsToCartInput {
187
- cart_id : String !
188
- cartItems : [VirtualProductCartItemInput ! ]!
189
- }
190
-
191
- input SimpleProductCartItemInput {
192
- data : CartItemInput !
193
- customizable_options :[CustomizableOptionInput ! ]
194
- }
195
-
196
- input VirtualProductCartItemInput {
197
- data : CartItemInput !
198
- customizable_options :[CustomizableOptionInput ! ]
199
- }
200
-
201
- input CustomizableOptionInput {
202
- id : Int !
203
- value : String !
204
- }
205
-
206
201
type AddSimpleProductsToCartOutput {
207
202
cart : Cart !
208
203
}
@@ -219,11 +214,6 @@ type VirtualCartItem implements CartItemInterface @doc(description: "Virtual Car
219
214
customizable_options : [SelectedCustomizableOption ] @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CustomizableOptions" )
220
215
}
221
216
222
- input CartItemInput {
223
- sku : String !
224
- qty : Float !
225
- }
226
-
227
217
interface CartItemInterface @typeResolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CartItemTypeResolver" ) {
228
218
id : String !
229
219
qty : Float !
@@ -252,8 +242,3 @@ type CartItemSelectedOptionValuePrice {
252
242
units : String !
253
243
type : PriceTypeEnum !
254
244
}
255
-
256
- input CartItemDetailsInput {
257
- sku : String !
258
- qty : Float !
259
- }
0 commit comments