Skip to content

Conversation

@antograssiot
Copy link
Contributor

@antograssiot antograssiot commented Apr 24, 2018

* @ApiResource
* @ApiFilter(OrderFilter::class, properties={"product.releaseDate"})
* @ApiFilter(SearchFilter::class, properties={"product.name": "exact"})
* @ApiFilter(SearchFilter::class, properties={"product.color": "exact"})
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Contributor Author

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:

```
Copy link
Member

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

Copy link
Contributor Author

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:

```
Copy link
Member

Choose a reason for hiding this comment

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

sale here

@antograssiot
Copy link
Contributor Author

all set as requested @dunglas

@dunglas dunglas merged commit 39b9ba8 into api-platform:2.2 Apr 25, 2018
@dunglas
Copy link
Member

dunglas commented Apr 25, 2018

Thanks @antograssiot

@antograssiot antograssiot deleted the graphql-filters branch April 25, 2018 06:49
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

Successfully merging this pull request may close these issues.

2 participants