Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Swatches: expose Hex color code and swatch images #196

Closed
misha-kotov opened this issue Oct 3, 2018 · 3 comments
Closed

Swatches: expose Hex color code and swatch images #196

misha-kotov opened this issue Oct 3, 2018 · 3 comments
Assignees
Labels
bug Something isn't working Component: CatalogGraphQl Contribution Day Tickets is good for start on Contribution Day Fixed in 2.3.x good first issue Good for newcomers

Comments

@misha-kotov
Copy link

Description

As a Magento developer, I need GraphQL to expose the Hex color code and the swatch images for visual swatch attributes so that I can render the appropriate color/image on storefront.

Benefits

Easier rendering of visual swatches on storefront

Additional information

Current request

{
  products(filter: {sku: {eq: "MH10"}}) {
    items {
      name
        ... on ConfigurableProduct{
        configurable_options{
          id
          label
          values {
            value_index
            label
            default_label
            store_label
            use_default_value
          }
        }
      }
    }
  }
}

Current response

{
  "data": {
    "products": {
      "items": [
        {
          "name": "Mach Street Sweatshirt ",
          "configurable_options": [
            {
              "id": 21,
              "label": "Color",
              "values": [
                {
                  "value_index": 49,
                  "label": "Black",
                  "default_label": "Black",
                  "store_label": "Black",
                  "use_default_value": true
                },
                {
                  "value_index": 50,
                  "label": "Blue",
                  "default_label": "Blue",
                  "store_label": "Blue",
                  "use_default_value": true
                },
...

Acceptance criteria

  • GraphQL user is able to request the hex color code value of any swatch attribute that has a color selected
  • GraphQL user is able to request the swatch image of any swatch attribute that has an image selected
  • Docs are updated
  • Tests are written
@naydav naydav added the Contribution Day Tickets is good for start on Contribution Day label Oct 4, 2018
@nuzil nuzil self-assigned this Oct 12, 2018
@naydav naydav unassigned nuzil Nov 5, 2018
@VoronoyAlexandr
Copy link
Contributor

Good day, can i try this task?

@naydav
Copy link
Contributor

naydav commented Nov 5, 2018

@VoronoyAlexandr
Ticket has been assigned to you

@naydav naydav modified the milestones: Release: 2.3.3, Release: 2.3.4 Aug 1, 2019
lenaorobei added a commit to lenaorobei/architecture that referenced this issue Nov 4, 2019
lenaorobei added a commit to sergiy-v/graphql-ce that referenced this issue Dec 16, 2019
- added new schema
- removed redundant code
lenaorobei added a commit to sergiy-v/graphql-ce that referenced this issue Dec 16, 2019
lenaorobei added a commit to sergiy-v/graphql-ce that referenced this issue Dec 17, 2019
lenaorobei added a commit to sergiy-v/graphql-ce that referenced this issue Dec 17, 2019
lenaorobei added a commit to sergiy-v/graphql-ce that referenced this issue Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Component: CatalogGraphQl Contribution Day Tickets is good for start on Contribution Day Fixed in 2.3.x good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants