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

Implement totalQuantity to Order type #465

Closed
villesau opened this issue Sep 14, 2020 · 0 comments
Closed

Implement totalQuantity to Order type #465

villesau opened this issue Sep 14, 2020 · 0 comments

Comments

@villesau
Copy link

villesau commented Sep 14, 2020

Is your feature request related to a problem? Please describe.

When showing cart, it's nice to be able to show the total quantity next to cart. This is only possible by iterating trough the order lines. However, would be nice if I could query total quantity of products from the backend easily as a single number.

Describe the solution you'd like

Implement new field to Order type that returns total quantity of products in order:

query order {
  activeOrder {
      total
      totalQuantity <--- this
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants