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

GraphQL: Add hasVariant argument to product(s) query #1544

Closed
nfourtythree opened this issue Jun 30, 2020 · 4 comments
Closed

GraphQL: Add hasVariant argument to product(s) query #1544

nfourtythree opened this issue Jun 30, 2020 · 4 comments
Assignees
Labels

Comments

@nfourtythree
Copy link
Contributor

No description provided.

@nfourtythree
Copy link
Contributor Author

This has been added and will be included in the next release.

@yingban
Copy link

yingban commented Jun 30, 2020

Thank very much !
I was wondering why some fields are available in PHP/Twig product query, but not with GraphQL.
Indeed recently, "salePrice" was added, and now "hasVariant", would it make sense to enable all fields in GraphQL which are working in PHP/Twig?

@nfourtythree
Copy link
Contributor Author

In some cases, it is not an easy 1-to-1 map of features from element queries to GraphQL queries.

We are trying to keep the features in sync as much as we can.

Thanks.

@yingban
Copy link

yingban commented Jul 13, 2020

Thank you @nfourtythree for the last release !

Would it possible to add Craft Commerce API built-in dimensions (width, height and length) as arguments to hasVariant product query, as well as price array argument ?
Also, would it possible to extend the range query argument to any custom field with Int/Float type?

For example
query Variants($colour: [QueryArgument]) { variants( colour: $colour, width: ['and', '> 100', '< 200'], height: 200, price: ['and', '> 10', '< 10'] ) { id } }

Or is there any way do to it already?

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

No branches or pull requests

2 participants