You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-20Lines changed: 76 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,10 @@ The following filter operators are exposed by default:
103
103
104
104
## Examples
105
105
106
-
### Null values
106
+
<details>
107
+
<summary>Null values</summary>
108
+
<br>
109
+
NOTE: The syntax for filtering null values will be standardized before the v1.0.0 release. There are currently two options:
107
110
108
111
```graphql
109
112
query {
@@ -115,7 +118,21 @@ query {
115
118
}
116
119
```
117
120
118
-
### Non-null values
121
+
```graphql
122
+
query {
123
+
allPosts(filter: {
124
+
body: { is: NULL }
125
+
}) {
126
+
...
127
+
}
128
+
}
129
+
```
130
+
</details>
131
+
132
+
<details>
133
+
<summary>Non-null values</summary>
134
+
<br>
135
+
NOTE: The syntax for filtering null values will standardized before the v1.0.0 release. There are currently two options:
119
136
120
137
```graphql
121
138
query {
@@ -127,7 +144,20 @@ query {
127
144
}
128
145
```
129
146
130
-
### Comparison operator with scalar input
147
+
```graphql
148
+
query {
149
+
allPosts(filter: {
150
+
body: { is: NOT_NULL }
151
+
}) {
152
+
...
153
+
}
154
+
}
155
+
```
156
+
</details>
157
+
158
+
<details>
159
+
<summary>Comparison operator with scalar input</summary>
160
+
<br>
131
161
```graphql
132
162
query {
133
163
allPosts(filter: {
@@ -137,8 +167,11 @@ query {
137
167
}
138
168
}
139
169
```
170
+
</details>
140
171
141
-
### Comparison operator with array input
172
+
<details>
173
+
<summary>Comparison operator with array input</summary>
174
+
<br>
142
175
```graphql
143
176
query {
144
177
allPosts(filter: {
@@ -148,8 +181,13 @@ query {
148
181
}
149
182
}
150
183
```
184
+
</details>
185
+
186
+
<details>
187
+
<summary>Multiple comparison operators</summary>
188
+
<br>
189
+
Note: Objects with multiple keys are interpreted with an implicit `AND` between the conditions.
151
190
152
-
### Multiple comparison operators
153
191
```graphql
154
192
query {
155
193
allPosts(filter: {
@@ -160,10 +198,11 @@ query {
160
198
}
161
199
}
162
200
```
201
+
</details>
163
202
164
-
Note: Objects with multiple keys are interpreted with an implicit `AND` between the conditions.
165
-
166
-
### Logical operator
203
+
<details>
204
+
<summary>Logical operator</summary>
205
+
<br>
167
206
```graphql
168
207
query {
169
208
allPosts(filter: {
@@ -176,9 +215,11 @@ query {
176
215
}
177
216
}
178
217
```
218
+
</details>
179
219
180
-
### Nested logic
181
-
220
+
<details>
221
+
<summary>Nested logic</summary>
222
+
<br>
182
223
```graphql
183
224
query {
184
225
allPosts(filter: {
@@ -193,9 +234,11 @@ query {
193
234
}
194
235
}
195
236
```
237
+
</details>
196
238
197
-
### Related tables
198
-
239
+
<details>
240
+
<summary>Related tables</summary>
241
+
<br>
199
242
```graphql
200
243
query {
201
244
allPeople(filter: {
@@ -215,16 +258,19 @@ query {
215
258
}
216
259
}
217
260
```
261
+
</details>
218
262
219
263
For additional examples, see the [tests](https://github.com/mattbretl/postgraphile-plugin-connection-filter/blob/master/__tests__/fixtures/queries/connections-filter.graphql).
220
264
221
265
## Plugin Options
222
266
223
267
When using PostGraphile as a library, the following plugin options can be passed via `graphileBuildOptions`:
0 commit comments