How to use the postgraphile.createPostGraphileSchema function in postgraphile

To help you get started, we’ve selected a few postgraphile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graphile / gatsby-source-pg / lib / createSchema.js View on Github external
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;
};

postgraphile

A GraphQL schema created by reflection over a PostgreSQL schema 🐘 (previously known as PostGraphQL)

MIT
Latest version published 1 year ago

Package Health Score

78 / 100
Full package analysis