@graphile-contrib/pgdbi

1.0.9-alpha.111 • Public • Published

@graphile-contrib/pgdbi

Installation

yarn add @graphile-contrib/pgdbi

Usage

Currently recommended for development only; to disable in production, do not load this plugin.

This is a PostGraphile Server Plugin so you can follow the standard server plugin instructions, namely:

For the CLI, use --plugins to load the plugin (and remember this flag must come at the very start!)

postgraphile --plugins @graphile-contrib/pgdbis -c my_db

For PostGraphile as a library/middleware, you must use the plugin hook functionality:

const pgdbi = require('@graphile-contrib/pgdbi');
const { postgraphile, makePluginHook } = require('postgraphile');

const pluginHook = makePluginHook([
  pgdbi,
  /* other server plugins can be added here */
]);

app.use(
  postgraphile(connectionString, schemas, {
    pluginHook,
  }),
);

You can access pgdbi at the /pgdbi sub path, e.g. http://localhost:5000/pgdbi.

/@graphile-contrib/pgdbi/

    Package Sidebar

    Install

    npm i @graphile-contrib/pgdbi

    Weekly Downloads

    4

    Version

    1.0.9-alpha.111

    License

    MIT

    Unpacked Size

    14 MB

    Total Files

    66

    Last publish

    Collaborators

    • benjie
    • enisdenjo
    • mattbretl
    • stlbucket