-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Describe how to filter on nested properties with GraphQL #472
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
Conversation
@@ -508,7 +508,7 @@ use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; | |||
/** | |||
* @ApiResource | |||
* @ApiFilter(OrderFilter::class, properties={"product.releaseDate"}) | |||
* @ApiFilter(SearchFilter::class, properties={"product.name": "exact"}) | |||
* @ApiFilter(SearchFilter::class, properties={"product.color": "exact"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dunglas the actual example is off.
just bellow it states The above allows you to find offers by their respective product's color: http://localhost:8000/api/offers?product.color=red
core/graphql.md
Outdated
The above allows you to find offers by their respective product's color like for the REST Api. | ||
You can then filter using the folowing syntax: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use ```graphql do enable syntax highlighting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update tonight 👍
core/graphql.md
Outdated
|
||
Or order your results like: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sale here
5a5c414
to
52ccb2a
Compare
all set as requested @dunglas |
52ccb2a
to
62437fb
Compare
Thanks @antograssiot |
Follows api-platform/core#1868