Skip to content

Commit e532802

Browse files
authored
Merge pull request #269 from neo4j/case-insensitive-filters
Add case insensitive filters documentation
2 parents 3fbf2a3 + 467f3a3 commit e532802

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

modules/ROOT/pages/filtering.adoc

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ query CloseByUsers {
177177

178178
=== String comparison
179179

180-
The following case-sensitive comparison operators are available for `String` and `ID` types:
180+
The following comparison operators are available for `String` and `ID` types:
181181

182182
* `startsWith`
183183
* `endsWith`
@@ -230,6 +230,35 @@ const features = {
230230
const neoSchema = new Neo4jGraphQL({ features, typeDefs, driver });
231231
----
232232

233+
==== Case-insensitive comparison
234+
235+
Case insensitive filters can be enabled with the `CASE_INSENSITIVE` option:
236+
237+
```javascript
238+
const neoSchema = new Neo4jGraphQL({
239+
features: {
240+
filters: {
241+
String: {
242+
CASE_INSENSITIVE: true,
243+
},
244+
},
245+
},
246+
});
247+
```
248+
249+
This enables the field `caseInsensitive` on string filters:
250+
251+
```graphql
252+
query {
253+
movies(where: { title: { caseInsensitive: { eq: "the matrix" } } }) {
254+
title
255+
}
256+
}
257+
```
258+
259+
All the string filters can be used along with `caseInsensitive`.
260+
261+
233262
=== RegEx matching
234263

235264
The filter `matches` is available for comparison of `String` and `ID` types.
@@ -628,4 +657,4 @@ query EventsAggregate {
628657
| -
629658
| -
630659

631-
|===
660+
|===

0 commit comments

Comments
 (0)