magento / magento/catalog-storefront

Nested product/category GQL fields must use Storefront resolver.

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Need to review existing GQL schema and override/introduce new resolvers for all product/category fields.

E.g. the following query use "product" which need to be overridden:

  addSimpleProductsToCart(input: {
    cart_id: "1drXoOv8VZCcH8JYUF3KCXHqJBzeV1pv",
    cart_items: [{data: {sku: "simple-2", quantity: 1}}]
  }) {
    cart {
      items {
        id
        prices{
          price {
            value
          }
        }
        quantity
        product { //This should be overridedn with Storefront resolver
          sku
          name
          image {
            label
            url
          }
        }
      }
    }
  }
}

Example of overriding
https://github.com/magento/catalog-storefront/commit/dfb66e4ac3baf99c69e42e39b1732b67c4a78421#diff-f0a25dfa8dd4f3476fe6ec0e598a377cR7-R10

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

Review the existing GQL schema and trace nested product and category fields, starting with the product field in the example cart query. Compare the resolver override pattern in commit dfb66e4ac3baf99c69e42e39b1732b67c4a78421. Done means all relevant product and category fields use Storefront resolvers.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.