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

GraphQl-198: Products: access to related/up-sell/cross-sell product fields #371

Conversation

VitaliyBoyko
Copy link
Contributor

Description (*)

PR For issue #198 Products: access to related/up-sell/cross-sell product fields
This PR added functionality for query/response with related products.

Manual testing scenarios (*)

Sample request

{
  products(filter: { sku: { eq: "product_dynamic_8" } }) {
    items {
      id
      name
      url_key
      categories {
        id
      }
      crosssell_products {
        items {
          name
          sku
          url_key
          canonical_url
          image {
            url
          }
          price {
            regularPrice {
              amount {
                value
              }
            }
            minimalPrice {
              amount {
                value
              }
            }
            maximalPrice {
              amount {
                value
              }
            }
          }
        }
      }
      upsell_products {
        items {
          name
          sku
          url_key
          canonical_url
          image {
            url
          }
          price {
            regularPrice {
              amount {
                value
              }
            }
            minimalPrice {
              amount {
                value
              }
            }
            maximalPrice {
              amount {
                value
              }
            }
          }
        }
      }
      related_products {
        items {
          name
          sku
          url_key
          canonical_url
          image {
            url
            label
          }
          price {
            regularPrice {
              amount {
                value
                currency
              }
              adjustments {
                amount {
                  value
                  currency
                }
                code
                description
              }
            }
            maximalPrice {
              amount {
                value
                currency
              }
              adjustments {
                amount {
                  value
                  currency
                }
                code
                description
              }
            }
            minimalPrice {
              amount {
                value
                currency
              }
              adjustments {
                amount {
                  value
                  currency
                }
                code
                description
              }
            }
          }
        }
      }
    }
  }
}

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@naydav naydav changed the title 198 access to related up sell cross sell product fields GraphQl-198: Products: access to related/up-sell/cross-sell product fields May 2, 2019
Copy link
Contributor

@naydav naydav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VitaliyBoyko
As was mentioned on demo, need to extract logic from CatalogGraphQl module to separate module like RelatedProductGraphQl

@ghost
Copy link

ghost commented May 10, 2019

Hi @VitaliyBoyko, 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants