magento / catalog-storefront

Open Software License 3.0
7 stars 18 forks source link

Map Selected Custom Options to GQL shema #286

Open mslabko opened 4 years ago

mslabko commented 4 years ago

Source: https://github.com/magento/catalog-storefront/issues/172 TODO: add a description

Changes to proto schema to align it with GraphQL schema needs:

GraphQL => proto Mapping:

interface CustomizableProductInterface  {
    options: [CustomizableOptionInterface] // map to Product::options
}

interface CustomizableOptionInterface  { // ProductOption
    option_id:                      // ProductOption::id 
    title:                               // ProductOption::label
    required:                            // ProductOption::required
    sort_order:                          // ProductOption::sort_order
}

type CustomizableRadioOption implements CustomizableOptionInterface { //ProductOption
    value: [CustomizableRadioValue]                                   // ProductOptionValue
}

type CustomizableRadioValue { //ProductOptionValue
    option_type_id:  // deprecated
    uid:           // ProductOptionValue::id
    price:                    // ProductVariant::product_identifier_in_pricing
    price_type:               // deprecated. We would always have precalculated price for variant.
    sku:                      // deprecated. Doesn't use on UI
    title:                    //  ProductOptionValue::label
    sort_order:               // ProductOptionValue::sort_order
}

type CustomizableDropDownOption implements CustomizableOptionInterface { //ProductOption
    value: [CustomizableDropDownValue] //ProductOptionValue
    required:                          // ProductOption::required
}

type CustomizableDropDownValue { //ProductOptionValue
    option_type_id:  // deprecated
    uid:           // ProductOptionValue::id
    price:                       // ProductVariant::price
    price_type:                  // deprecated. We would always have precalculated price for variant.
    sku:                         // deprecated. Doesn't use on UI
    title:                       // ProductOptionValue::label
    sort_order:                  // ProductOptionValue::sort_order
}
m2-assistant[bot] commented 4 years ago

Hi @mslabko. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this