magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

[FEATURE] Makes it possible to retrieve the product_specifications on a Product Page #1022

Closed lewisvoncken closed 4 years ago

lewisvoncken commented 4 years ago

Description (*)

In the Luma theme it is possible to retrieve a block with product specifications containing the product attributes which are set visible on front.

Manual testing scenarios (*)

  1. use the following query and variables to retrieve the the product detail information
    query productDetail($urlKey: String) {
    productDetail: products(filter: {url_key: {eq: $urlKey}}) {
    items {
      __typename
      sku
      name
      url_path
      product_specifications {
        label
        value
        code
        __typename
      }
    }
    __typename
    }
    }
    {"urlKey":"your-product-urlkey"}
  2. You should see additional product specifications in the following format:
          "product_specifications": [
            {
              "label": "Brand",
              "value": "Mr. Lewis",
              "code": "brand",
              "__typename": "ProductSpecifications"
            },
            {
              "label": "Gender",
              "value": "Women",
              "code": "gender",
              "__typename": "ProductSpecifications"
            },
            {
              "label": "Color",
              "value": "White",
              "code": "color",
              "__typename": "ProductSpecifications"
            }

Questions or comments

Contribution checklist (*)

lenaorobei commented 4 years ago

@lewisvoncken, product options are already supported in Magento GraphQL. Please have a look at CustomizableOptionInterface.

lenaorobei commented 4 years ago

@lewisvoncken, closing this ticket since no update. For the new feature please create GitHub issue first. It will allow to invite product owner in the discussion and make the decision regarding this.

If you need additional field, please consider extension schema in your custom module. Thanks.

ghost commented 4 years ago

Hi @lewisvoncken, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.