Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "productSpecificationGroups" resolver to OrderFormItems #707

Open
pedrobernardina opened this issue Sep 18, 2023 · 0 comments
Open

Add "productSpecificationGroups" resolver to OrderFormItems #707

pedrobernardina opened this issue Sep 18, 2023 · 0 comments

Comments

@pedrobernardina
Copy link

Add resolver "productSpecificationGroups" to Item

In Fashion segment it's common to have different product colours as different (similar) products instead of SKUs, due to the limited number of SKUs we can have on the platform. It's impossible to get product specifications (such as colour) in the current orderForm implementation without having to make an extra API call for each item, impacting user experience. For mobile apps this is unfeasible.

We've opened an PR implementing this.
vtex-apps/checkout-graphql#191

In the proposed implementation, it would be possible to get this data with the query:

query ProductSpecificationGroups($orderFormId: ID, $refreshOutdatedData: Boolean) {
  orderForm(orderFormId: $orderFormId, refreshOutdatedData: $refreshOutdatedData)   {
    items {
      id
      productSpecificationGroups {
        name
        originalName
        specifications {
          name
          originalName
          values
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant