@@ -7,15 +7,48 @@ type Query {
77
88type Mutation {
99 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" )
1312 applyCouponToCart (input : ApplyCouponToCartInput ): ApplyCouponToCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ ApplyCouponToCart" )
1413 removeCouponFromCart (input : RemoveCouponFromCartInput ): RemoveCouponFromCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ RemoveCouponFromCart" )
14+ setShippingAddressesOnCart (input : SetShippingAddressesOnCartInput ): SetShippingAddressesOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetShippingAddressesOnCart" )
1515 setBillingAddressOnCart (input : SetBillingAddressOnCartInput ): SetBillingAddressOnCartOutput @resolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ SetBillingAddressOnCart" )
1616 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 !
1952}
2053
2154input SetShippingAddressesOnCartInput {
@@ -24,7 +57,7 @@ input SetShippingAddressesOnCartInput {
2457}
2558
2659input 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
2861 address : CartAddressInput
2962 cart_items : [CartItemQuantityInput ! ]
3063}
@@ -81,19 +114,6 @@ type SetShippingMethodsOnCartOutput {
81114 cart : Cart !
82115}
83116
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-
97117type ApplyCouponToCartOutput {
98118 cart : Cart !
99119}
@@ -172,31 +192,6 @@ type RemoveCouponFromCartOutput {
172192 cart : Cart
173193}
174194
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-
200195type AddSimpleProductsToCartOutput {
201196 cart : Cart !
202197}
@@ -213,11 +208,6 @@ type VirtualCartItem implements CartItemInterface @doc(description: "Virtual Car
213208 customizable_options : [SelectedCustomizableOption ] @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CustomizableOptions" )
214209}
215210
216- input CartItemInput {
217- sku : String !
218- qty : Float !
219- }
220-
221211interface CartItemInterface @typeResolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CartItemTypeResolver" ) {
222212 id : String !
223213 qty : Float !
@@ -246,8 +236,3 @@ type CartItemSelectedOptionValuePrice {
246236 units : String !
247237 type : PriceTypeEnum !
248238}
249-
250- input CartItemDetailsInput {
251- sku : String !
252- qty : Float !
253- }
0 commit comments