Magento GraphQL can return not only the data of a configurable product but also its configurable attributes and associated child products. For example, the query might look like this:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
{ products( filter: { sku: { eq: "CONFIGURABLE-SKU" } } ) { items { sku name ... on ConfigurableProduct { configurable_options { attribute_code label values { uid label } } variants { product { sku name stock_status } } } } } } |
The expression … on ConfigurableProduct is an inline fragment. A…