Skip to content

Commit a8164a8

Browse files
authored
Merge pull request #524 from ArnoudThibaut/add-example-for-multi-values-filters
Update doc for api-platform/core#2070
2 parents 93c1c79 + 7e9016b commit a8164a8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

core/graphql.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,24 @@ Or order your results like:
135135
}
136136
}
137137
```
138+
Another difference with the REST API filters is that the keyword `_list` must be used instead of the traditional `[]` to filter over multiple values.
139+
140+
For example, if you want to search the offers with a green or a red product you can use the following syntax:
141+
```graphql
142+
{
143+
offers(product_color_list: ["red", "green"]) {
144+
edges {
145+
node {
146+
id
147+
product {
148+
name
149+
color
150+
}
151+
}
152+
}
153+
}
154+
}
155+
```
138156

139157
## Security (`access_control`)
140158

0 commit comments

Comments
 (0)