magento / catalog-storefront

Open Software License 3.0
7 stars 18 forks source link

Map grouped product to GQL Schema #290

Open mslabko opened 4 years ago

mslabko commented 4 years ago

Source: https://github.com/magento/catalog-storefront/issues/205 TODO: AC

GraphQL => proto Mapping:

interface ProductInterface {
    product_links:                 // (only for associated products) map to options. Note: grouped product options implement as associated links.
}

interface ProductLinksInterface  { //(only for associated products that is grouped product items under the hood)
    sku:                           // could be retrieved from variant id by the rule variantID == productID
    link_type:                     // always associated for grouped product items
    linked_product_sku:            // looks like the same as SKU
    linked_product_type:           //  could be retrieved from variant id by the rule variantID == productID
    position:                      // ProductOption::sort_order
}

type GroupedProduct {
    items: // map to options and variant
}

type GroupedProductItem {
    qty: // map to ProductVariant:: productIdentifierInInventory
    position: // ProductOption:: sortOrder
    product: // could be retrieved from rule Variant ID == product ID
}
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