Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = async (pool, schema, options) => {
const schemas = Array.isArray(schema) ? schema : schema.split(",");
const graphqlSchema = await createPostGraphileSchema(pool, schemas, {
simpleCollections: "both",
dynamicJson: true,
showErrorStack: true,
extendedErrors: ["hint", "detail", "errcode"],
legacyRelations: "omit",
...options,
skipPlugins: [...skipPlugins, ...(options.skipPlugins || [])],
prependPlugins: [...prependPlugins, ...(options.prependPlugins || [])],
});
return graphqlSchema;
};