Skip to content

Commit e0bd6b1

Browse files
authored
feat: allow specifying to use list inflectors (#177)
1 parent fda1bc1 commit e0bd6b1

File tree

7 files changed

+7255
-5
lines changed

7 files changed

+7255
-5
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,24 @@ postgraphile(pgConfig, schema, {
232232
When `false`, passing `{}` as a field value will throw an error.
233233
When `true`, passing `{}` as a field value is equivalent to omitting the field.
234234

235+
#### connectionFilterUseListInflectors
236+
237+
When building the "many" relationship filters, if this option is set `true`
238+
then we will use the "list" field names rather than the "connection" field
239+
names when naming the fields in the filter input. This would be desired if you
240+
have `simpleCollection` set to `"only"` or `"both"` and you've simplified your
241+
inflection to omit the `-list` suffix, e.g. using
242+
`@graphile-contrib/pg-simplify-inflector`'s `pgOmitListSuffix` option. Use this
243+
if you see `Connection` added to your filter field names.
244+
245+
```js
246+
postgraphile(pgConfig, schema, {
247+
graphileBuildOptions: {
248+
connectionFilterUseListInflectors: true, // default: false
249+
},
250+
});
251+
```
252+
235253
## Examples
236254

237255
```graphql

0 commit comments

Comments
 (0)