Cannot use nested filters
PedroD opened this issue · 2 comments
PedroD commented
Hello,
I am trying to use nested filters as exemplified in the README, but without success:
The filter
is not supported there.
These are the plugins I have and the settings:
module.exports = {
options: {
connection: "postgres://postgres:test@host.docker.internal:5432/conso",
schema: ["public"],
port: 5000,
watch: true,
appendPlugins: "postgraphile-plugin-connection-filter,@graphile-contrib/pg-many-to-many",
disableDefaultMutations: true,
graphileBuildOptions: {
connectionFilterRelations: false, // tried with true already
},
},
};
Am I missing something?
Thanks
mattbretl commented
Hey @PedroD , this is the issue:
appendPlugins: "postgraphile-plugin-connection-filter,@graphile-contrib/pg-many-to-many",
That should be an array of modules, e.g.
const ConnectionFilterPlugin = require("postgraphile-plugin-connection-filter");
const ManyToManyPlugin = require("@graphile-contrib/pg-many-to-many");
const middleware = postgraphile(DATABASE_URL, SCHEMAS, {
appendPlugins: [ConnectionFilterPlugin, ManyToManyPlugin],
});
mattbretl commented
[semi-automated message] I'm going to close this issue because it's not a bug in the plugin, but please feel free to continue the conversation below.