Currently this plugin uses the presence of connections to indicate whether the "connection" or "simple" (list) inflectors are used for backwards relations:
It's common to change your choice as to whether you want simple collections, connections, or both in your GraphQL schema (and you can change it on a resource-by-resource basis), so it's designed to be non-breaking when you expand from one of the options to using both. As such, we require explicit opt-out of having the -list suffix; the @graphile-contrib/pg-simplify-inflector plugin offers this via the pgOmitListSuffix option.
Ideally we'd switch this plugin to use that option too, but that would be a breaking change. So instead, I have introduced a new option connectionFilterUseListInflectors that tells the plugin explicitly whether to use the list inflectors or not, if present it will override the default logic.
The main value of this is for users who have simpleCollections: "both" and pgOmitListSuffix: true.
Currently this plugin uses the presence of connections to indicate whether the "connection" or "simple" (list) inflectors are used for backwards relations:
https://github.com/graphile-contrib/postgraphile-plugin-connection-filter/blob/fda1bc1e4474a3a64be10f3228c81b88560f6799/src/PgConnectionArgFilterBackwardRelationsPlugin.ts#L9
https://github.com/graphile-contrib/postgraphile-plugin-connection-filter/blob/fda1bc1e4474a3a64be10f3228c81b88560f6799/src/PgConnectionArgFilterBackwardRelationsPlugin.ts#L302-L314
It's common to change your choice as to whether you want simple collections, connections, or both in your GraphQL schema (and you can change it on a resource-by-resource basis), so it's designed to be non-breaking when you expand from one of the options to using both. As such, we require explicit opt-out of having the
-list
suffix; the@graphile-contrib/pg-simplify-inflector
plugin offers this via thepgOmitListSuffix
option.Ideally we'd switch this plugin to use that option too, but that would be a breaking change. So instead, I have introduced a new option
connectionFilterUseListInflectors
that tells the plugin explicitly whether to use the list inflectors or not, if present it will override the default logic.The main value of this is for users who have
simpleCollections: "both"
andpgOmitListSuffix: true
.