Skip to content

Commit df153da

Browse files
author
Eric Bohanon
committed
MAGETWO-87147: Add customizable options to all product type schemas
1 parent 28d3102 commit df153da

File tree

5 files changed

+6
-26
lines changed

5 files changed

+6
-26
lines changed

app/code/Magento/BundleGraphQl/etc/graphql.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<type xsi:type="OutputType" name="BundleProduct">
88
<implements interface="ProductInterface" copyFields="true"/>
99
<implements interface="PhysicalProductInterface" copyFields="true"/>
10+
<implements interface="CustomizableProductInterface" copyFields="true"/>
1011
<field xsi:type="ObjectOutputField" name="price_view" type="PriceViewEnum"/>
1112
<field xsi:type="ScalarOutputField" name="dynamic_price" type="Boolean"/>
1213
<field xsi:type="ScalarOutputField" name="dynamic_sku" type="Boolean"/>

app/code/Magento/CatalogGraphQl/etc/graphql.xml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -222,30 +222,6 @@
222222
<type xsi:type="OutputType" name="ProductLinks">
223223
<implements interface="ProductLinksInterface" copyFields="true"/>
224224
</type>
225-
<type xsi:type="OutputType" name="ProductOptionsValues">
226-
<field xsi:type="ScalarOutputField" name="title" type="String"/>
227-
<field xsi:type="ScalarOutputField" name="sort_order" type="Int"/>
228-
<field xsi:type="ScalarOutputField" name="price" type="Float"/>
229-
<field xsi:type="ScalarOutputField" name="price_type" type="String"/>
230-
<field xsi:type="ScalarOutputField" name="sku" type="String"/>
231-
<field xsi:type="ScalarOutputField" name="option_type_id" type="Int"/>
232-
</type>
233-
<type xsi:type="OutputType" name="ProductOptions">
234-
<field xsi:type="ScalarOutputField" name="product_sku" type="String"/>
235-
<field xsi:type="ScalarOutputField" name="option_id" type="Int"/>
236-
<field xsi:type="ScalarOutputField" name="title" type="String"/>
237-
<field xsi:type="ScalarOutputField" name="type" type="String"/>
238-
<field xsi:type="ScalarOutputField" name="sort_order" type="Int"/>
239-
<field xsi:type="ScalarOutputField" name="is_require" type="Boolean"/>
240-
<field xsi:type="ScalarOutputField" name="price" type="Float"/>
241-
<field xsi:type="ScalarOutputField" name="price_type" type="String"/>
242-
<field xsi:type="ScalarOutputField" name="sku" type="String"/>
243-
<field xsi:type="ScalarOutputField" name="file_extension" type="String"/>
244-
<field xsi:type="ScalarOutputField" name="max_characters" type="Int"/>
245-
<field xsi:type="ScalarOutputField" name="image_size_x" type="Int"/>
246-
<field xsi:type="ScalarOutputField" name="image_size_y" type="Int"/>
247-
<field xsi:type="ObjectArrayOutputField" name="values" itemType="ProductOptionsValues"/>
248-
</type>
249225
<type xsi:type="OutputType" name="ProductTierPrices">
250226
<field xsi:type="ScalarOutputField" name="customer_group_id" type="Int"/>
251227
<field xsi:type="ScalarOutputField" name="qty" type="Float"/>
@@ -291,7 +267,6 @@
291267
<field xsi:type="ScalarArrayOutputField" name="website_ids" itemType="Int"/>
292268
<field xsi:type="ObjectArrayOutputField" name="category_links" itemType="ProductCategoryLinks"/>
293269
<field xsi:type="ObjectArrayOutputField" name="product_links" itemType="ProductLinksInterface"/>
294-
<field xsi:type="ObjectArrayOutputField" name="options" itemType="ProductOptions"/>
295270
<field xsi:type="ObjectArrayOutputField" name="media_gallery_entries" itemType="MediaGalleryEntry"/>
296271
<field xsi:type="ObjectArrayOutputField" name="tier_prices" itemType="ProductTierPrices"/>
297272
<field xsi:type="ObjectOutputField" name="price" type="ProductPrices"/>
@@ -307,14 +282,15 @@
307282
<field xsi:type="ScalarOutputField" name="title" type="String"/>
308283
<field xsi:type="ScalarOutputField" name="required" type="Boolean"/>
309284
<field xsi:type="ScalarOutputField" name="sort_order" type="Int"/>
310-
<field xsi:type="ScalarOutputField" name="previous_group" type="String"/>
311285
</type>
312286
<type xsi:type="OutputType" name="VirtualProduct">
313287
<implements interface="ProductInterface" copyFields="true"/>
288+
<implements interface="CustomizableProductInterface" copyFields="true"/>
314289
</type>
315290
<type xsi:type="OutputType" name="SimpleProduct">
316291
<implements interface="ProductInterface" copyFields="true"/>
317292
<implements interface="PhysicalProductInterface" copyFields="true"/>
293+
<implements interface="CustomizableProductInterface" copyFields="true"/>
318294
</type>
319295
<type xsi:type="InputType" name="ProductFilterInput">
320296
<field xsi:type="ObjectInputField" name="name" type="FilterTypeInput"/>

app/code/Magento/ConfigurableProductGraphQl/etc/graphql.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<type xsi:type="OutputType" name="ConfigurableProduct">
88
<implements interface="ProductInterface" copyFields="true"/>
99
<implements interface="PhysicalProductInterface" copyFields="true"/>
10+
<implements interface="CustomizableProductInterface" copyFields="true"/>
1011
<field xsi:type="ObjectArrayOutputField" name="configurable_product_links" itemType="SimpleProduct"/>
1112
<field xsi:type="ObjectArrayOutputField" name="configurable_product_options" itemType="ConfigurableProductOptions"/>
1213
</type>

app/code/Magento/DownloadableGraphQl/etc/graphql.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_GraphQl:etc/graphql.xsd">
77
<type xsi:type="OutputType" name="DownloadableProduct">
88
<implements interface="ProductInterface" copyFields="true"/>
9+
<implements interface="CustomizableProductInterface" copyFields="true"/>
910
<field xsi:type="ObjectArrayOutputField" name="downloadable_product_samples" itemType="DownloadableProductSamples"/>
1011
<field xsi:type="ObjectArrayOutputField" name="downloadable_product_links" itemType="DownloadableProductLinks"/>
1112
<field xsi:type="ObjectOutputField" name="links_purchased_separately" type="Int"/>

app/code/Magento/GroupedProductGraphQl/etc/graphql.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<type xsi:type="OutputType" name="GroupedProduct">
88
<implements interface="ProductInterface" copyFields="true"/>
99
<implements interface="PhysicalProductInterface" copyFields="true"/>
10+
<implements interface="CustomizableProductInterface" copyFields="true"/>
1011
<field xsi:type="ObjectArrayOutputField" name="items" itemType="GroupedProductItem"/>
1112
</type>
1213
<type xsi:type="OutputType" name="GroupedProductItem">

0 commit comments

Comments
 (0)