magento / architecture

A place where Magento architectural discussions happen
274 stars 154 forks source link

magento/graphql-ce#196: Swatches: expose Hex color code and swatch images #337

Closed lenaorobei closed 4 years ago

lenaorobei commented 5 years ago

Solution

Proposed schema for adding swatch data for configurable options.

{
  products(filter: {sku: {eq: "configurable-product"}}) {
    items {
      ... on ConfigurableProduct{    
      configurable_options{
          values {
            label
            swatch_data{
              value
            }
          } 
        }
      }
    }
  }
}

Side notes

Requested Reviewers

@akaplya @paliarush

akaplya commented 4 years ago

Approved

paales commented 4 years ago

@lenaorobei Was just looking at this, shouldn't the swatch information also be available in the products aggregates?