Skip to content

Commit 3e4b38c

Browse files
committed
GraphQL-433: Prepare Quote GraphQL scheme for 2.3.1 release
1 parent 393575f commit 3e4b38c

File tree

7 files changed

+6
-237
lines changed

7 files changed

+6
-237
lines changed
Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
3-
type Mutation {
4-
addConfigurableProductsToCart(input: AddConfigurableProductsToCartInput): AddConfigurableProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart")
5-
}
63

74
type ConfigurableProduct implements ProductInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "ConfigurableProduct defines basic features of a configurable product and its simple product variants") {
85
variants: [ConfigurableVariant] @doc(description: "An array of variants of products") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ConfigurableVariant")
@@ -38,30 +35,3 @@ type ConfigurableProductOptionsValues @doc(description: "ConfigurableProductOpti
3835
store_label: String @doc(description: "The label of the product on the current store")
3936
use_default_value: Boolean @doc(description: "Indicates whether to use the default_label")
4037
}
41-
42-
input AddConfigurableProductsToCartInput {
43-
cart_id: String!
44-
cartItems: [ConfigurableProductCartItemInput!]!
45-
}
46-
47-
type AddConfigurableProductsToCartOutput {
48-
cart: Cart!
49-
}
50-
51-
input ConfigurableProductCartItemInput {
52-
data: CartItemInput!
53-
variant_sku: String!
54-
customizable_options:[CustomizableOptionInput!]
55-
}
56-
57-
type ConfigurableCartItem implements CartItemInterface {
58-
customizable_options: [SelectedCustomizableOption]!
59-
configurable_options: [SelectedConfigurableOption!]!
60-
}
61-
62-
type SelectedConfigurableOption {
63-
id: Int!
64-
option_label: String!
65-
value_id: Int!
66-
value_label: String!
67-
}
Lines changed: 1 addition & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,6 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
33

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-
84
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")
2126
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/AddSimpleProductToCartTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class AddSimpleProductToCartTest extends GraphQlAbstract
3535
*/
3636
protected function setUp()
3737
{
38+
$this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/434');
3839
$objectManager = Bootstrap::getObjectManager();
3940
$this->quoteResource = $objectManager->get(QuoteResource::class);
4041
$this->quote = $objectManager->create(Quote::class);

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CouponTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class CouponTest extends GraphQlAbstract
3535

3636
protected function setUp()
3737
{
38+
$this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/434');
3839
$objectManager = Bootstrap::getObjectManager();
3940
$this->quoteResource = $objectManager->create(QuoteResource::class);
4041
$this->quote = $objectManager->create(Quote::class);

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/GetCartTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class GetCartTest extends GraphQlAbstract
4444
*/
4545
protected function setUp()
4646
{
47+
$this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/434');
4748
$objectManager = Bootstrap::getObjectManager();
4849
$this->quoteResource = $objectManager->create(QuoteResource::class);
4950
$this->quote = $objectManager->create(Quote::class);

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/SetBillingAddressOnCartTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class SetBillingAddressOnCartTest extends GraphQlAbstract
4444

4545
protected function setUp()
4646
{
47+
$this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/434');
4748
$objectManager = Bootstrap::getObjectManager();
4849
$this->quoteResource = $objectManager->get(QuoteResource::class);
4950
$this->quoteFactory = $objectManager->get(QuoteFactory::class);

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/SetShippingAddressOnCartTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class SetShippingAddressOnCartTest extends GraphQlAbstract
4444

4545
protected function setUp()
4646
{
47+
$this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/434');
4748
$objectManager = Bootstrap::getObjectManager();
4849
$this->quoteResource = $objectManager->get(QuoteResource::class);
4950
$this->quoteFactory = $objectManager->get(QuoteFactory::class);

0 commit comments

Comments
 (0)