magento / magento/catalog-storefront

Map Selected Custom Options to GQL shema

Open
#286 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

GraphQL Mapping Progress: ready for grooming
Dominant language
PHP
Stars
7
Forks
16
PR merge metrics
No merged PRs in 30d

Description

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
}

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked catalog-storefront issue 172 and the GraphQL-to-proto mapping in this issue. Identify where the product option schema is defined and how selected custom options are represented. Done means the proto schema aligns with the listed GraphQL option and value fields, including deprecated fields and pre-calculated pricing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.