|
1 | 1 | type ConfigurableProduct { |
2 | | - configurable_options_selection_metadata(selectedConfigurableOptionValues: [ID!]): ConfigurableOptionsSelectionMetadata @doc(description: "Metadata for the specified configurable options selection") |
| 2 | + configurable_product_options_selection(configurableOptionValueUids: [ID!]): ConfigurableProductOptionsSelection @doc(description: "Specified configurable product options selection") |
| 3 | + variants: [ConfigurableVariant] @deprecated(reason: "Use configurable_options_selection_metadata instead.") @doc(description: "An array of variants of products") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ConfigurableVariant") |
| 4 | + configurable_options: [ConfigurableProductOptions] @deprecated(reason: "Use configurable_options_selection_metadata instead.") @doc(description: "An array of linked simple product items") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Options") |
3 | 5 | } |
4 | 6 |
|
5 | | -type ConfigurableOptionsSelectionMetadata @doc(description: "Metadata corresponding to the configurable options selection.") |
| 7 | +type ConfigurableProductOptionsSelection @doc(description: "Metadata corresponding to the configurable options selection.") |
6 | 8 | { |
7 | | - options_available_for_selection: [ConfigurableOptionAvailableForSelection!] @doc(description: "Configurable options available for further selection based on current selection.") |
| 9 | + configurable_options: [ConfigurableProductOption!] @doc(description: "Configurable options available for further selection based on current selection.") |
8 | 10 | media_gallery: [MediaGalleryInterface!] @doc(description: "Product images and videos corresponding to the specified configurable options selection.") |
9 | 11 | variant: SimpleProduct @doc(description: "Variant represented by the specified configurable options selection. It is expected to be null, until selections are made for each configurable option.") |
10 | 12 | } |
11 | 13 |
|
12 | | -type ConfigurableOptionAvailableForSelection @doc(description: "Configurable option available for further selection based on current selection.") { |
13 | | - option_value_uids: [ID!]! @doc(description: "Configurable option values available for further selection.") |
14 | | - attribute_code: String! @doc(description: "Attribute code that uniquely identifies configurable option.") |
| 14 | +type ConfigurableProductOption { |
| 15 | + uid: ID! |
| 16 | + attribute_code: String! |
| 17 | + label: String! |
| 18 | + values: [ConfigurableProductOptionValue!] |
15 | 19 | } |
16 | 20 |
|
17 | | -# Configurable option value type has to be extended to include ID which can be used to uniquely identify the option value across the system. This is consistent with proposal of single mutation for add-to-cart |
18 | | -type ConfigurableProductOptionsValues { |
19 | | - uid: ID! |
20 | | - is_available_for_selection: Boolean! |
| 21 | +type ConfigurableProductOptionValue { |
| 22 | + uid: ID! # Encoding of this uid should respect encode_algm(format: configurable/<attribute-id>/<value_index>) |
| 23 | + # refer to https://github.com/magento/architecture/blob/master/design-documents/graph-ql/coverage/cart/add-items-to-cart-single-mutation.md#single-mutation-for-adding-products-to-cart |
| 24 | + is_available: Boolean! # When display out of stock is enabled, if the option value is out of stock, this will return false |
| 25 | + is_default: Boolean! |
| 26 | + label: String! |
| 27 | + swatch: SwatchDataInterface |
21 | 28 | } |
0 commit comments