Skip to content

Commit a1c581e

Browse files
author
Eric Bohanon
committed
MAGETWO-85839: GraphQL field level description documentation
1 parent 5520a3d commit a1c581e

File tree

12 files changed

+340
-340
lines changed

12 files changed

+340
-340
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@
88
<implements interface="ProductInterface" copyFields="true"/>
99
<implements interface="PhysicalProductInterface" copyFields="true"/>
1010
<implements interface="CustomizableProductInterface" copyFields="true"/>
11-
<field xsi:type="ObjectOutputField" name="price_view" type="PriceViewEnum"/>
12-
<field xsi:type="ScalarOutputField" name="dynamic_price" type="Boolean"/>
13-
<field xsi:type="ScalarOutputField" name="dynamic_sku" type="Boolean"/>
14-
<field xsi:type="ObjectOutputField" name="ship_bundle_items" type="ShipBundleItemsEnum"/>
15-
<field xsi:type="ScalarOutputField" name="dynamic_weight" type="Boolean"/>
16-
<field xsi:type="ObjectArrayOutputField" name="items" itemType="BundleItem"/>
11+
<field xsi:type="ObjectOutputField" name="price_view" type="PriceViewEnum" description="One of PRICE_RANGE or AS_LOW_AS"/>
12+
<field xsi:type="ScalarOutputField" name="dynamic_price" type="Boolean" description="Indicates whether the bundle product has a dynamic price."/>
13+
<field xsi:type="ScalarOutputField" name="dynamic_sku" type="Boolean" description="Indicates whether the bundle product has a dynamic SKU."/>
14+
<field xsi:type="ObjectOutputField" name="ship_bundle_items" type="ShipBundleItemsEnum" description="Indicates whether to ship bundle items together or individually."/>
15+
<field xsi:type="ScalarOutputField" name="dynamic_weight" type="Boolean" description="Indicates whether the bundle product has a dynamically calculated weight."/>
16+
<field xsi:type="ObjectArrayOutputField" name="items" itemType="BundleItem" description="An array containing information about individual bundle items."/>
1717
</type>
1818
<type xsi:type="OutputType" name="BundleItem">
19-
<field xsi:type="ScalarOutputField" name="option_id" type="Int"/>
20-
<field xsi:type="ScalarOutputField" name="title" type="String"/>
21-
<field xsi:type="ScalarOutputField" name="required" type="Boolean"/>
22-
<field xsi:type="ScalarOutputField" name="type" type="String"/>
23-
<field xsi:type="ScalarOutputField" name="position" type="Int"/>
24-
<field xsi:type="ScalarOutputField" name="sku" type="String"/>
25-
<field xsi:type="ObjectArrayOutputField" name="options" itemType="BundleItemOption"/>
19+
<field xsi:type="ScalarOutputField" name="option_id" type="Int" description="An ID assigned to each type of item in a bundle product."/>
20+
<field xsi:type="ScalarOutputField" name="title" type="String" description="The display name of the item"/>
21+
<field xsi:type="ScalarOutputField" name="required" type="Boolean" description="Indicates whether the item must be included in the bundle."/>
22+
<field xsi:type="ScalarOutputField" name="type" type="String" description="The input type that the customer uses to select the item. Examples include radio button and checkbox." />
23+
<field xsi:type="ScalarOutputField" name="position" type="Int" description="The relative position of this item compared to the other bundle items."/>
24+
<field xsi:type="ScalarOutputField" name="sku" type="String" description="The SKU of the bundle product"/>
25+
<field xsi:type="ObjectArrayOutputField" name="options" itemType="BundleItemOption" description="An array of additional options for this bundle item"/>
2626
</type>
2727
<type xsi:type="OutputType" name="BundleItemOption">
2828
<!-- is product_id same with entity_id and id ?? -->
29-
<field xsi:type="ScalarOutputField" name="id" type="Int"/>
30-
<field xsi:type="ScalarOutputField" name="label" type="String"/>
29+
<field xsi:type="ScalarOutputField" name="id" type="Int" description="The ID assigned to the bundled item option"/>
30+
<field xsi:type="ScalarOutputField" name="label" type="String" description="The text that identifies the bundled item option"/>
3131
<!--<field xsi:type="ScalarOutputField" name="option_id" type="Int"/>-->
32-
<field xsi:type="ScalarOutputField" name="qty" type="Float"/>
33-
<field xsi:type="ScalarOutputField" name="position" type="Int"/>
34-
<field xsi:type="ScalarOutputField" name="is_default" type="Boolean"/>
32+
<field xsi:type="ScalarOutputField" name="qty" type="Float" description="Indicates the quantity of this specific bundle item"/>
33+
<field xsi:type="ScalarOutputField" name="position" type="Int" description="When a bundle item contains multiple options, the relative position of this option compared to the other options"/>
34+
<field xsi:type="ScalarOutputField" name="is_default" type="Boolean" description="Indicates whether this option is the default option"/>
3535
<!-- price type and price don't get populated is it something about fixed price ? -->
36-
<field xsi:type="ScalarOutputField" name="price" type="Float"/>
37-
<field xsi:type="ObjectOutputField" name="price_type" type="PriceTypeEnum"/>
38-
<field xsi:type="ScalarOutputField" name="can_change_quantity" type="Boolean"/>
39-
<field xsi:type="ObjectOutputField" name="product" type="ProductInterface"/>
36+
<field xsi:type="ScalarOutputField" name="price" type="Float" description="The price of the selected option"/>
37+
<field xsi:type="ObjectOutputField" name="price_type" type="PriceTypeEnum" description="One of FIXED, PERCENT, or DYNAMIC"/>
38+
<field xsi:type="ScalarOutputField" name="can_change_quantity" type="Boolean" description="Indicates whether the customer can change the number of items for this option"/>
39+
<field xsi:type="ObjectOutputField" name="product" type="ProductInterface" description="The ProductInterface object, which contains details about this product option"/>
4040
</type>
4141
<type xsi:type="Enum" name="ShipBundleItemsEnum">
4242
<item name="together">TOGETHER</item>

0 commit comments

Comments
 (0)