Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pluginToSkip => basePluginList.indexOf(pluginToSkip) < 0
);
if (invalidSkipPlugins.length) {
function getFunctionName(fn: Plugin) {
return fn.displayName || fn.name || String(fn);
}
throw new Error(
`You tried to skip plugins that would never have been loaded anyway. Perhaps you've made a mistake in your skipPlugins list, or have sourced the plugin from a duplicate plugin module - check for duplicate modules in your 'node_modules' folder. The plugins that you requested to skip were: ${invalidSkipPlugins
.map(getFunctionName)
.join(", ")}`
);
}
const finalPluginList = basePluginList.filter(
p => skipPlugins.indexOf(p) === -1
);
return getBuilder(finalPluginList, {
pgConfig,
pgSchemas: Array.isArray(schemas) ? schemas : [schemas],
pgExtendedTypes: !!dynamicJson,
pgColumnFilter: pgColumnFilter || (() => true),
...({
pgInflection:
inflector ||
(classicIds
? postGraphileClassicIdsInflection
: postGraphileInflection),
} as any),
nodeIdFieldName: nodeIdFieldName || (classicIds ? "id" : "nodeId"),
pgJwtTypeIdentifier: jwtPgTypeIdentifier,
pgJwtSecret: jwtSecret,
pgJwtSignOptions: jwtSignOptions,
pgDisableDefaultMutations: disableDefaultMutations,