@graphile/supporter

0.8.4 • Public • Published

@graphile/supporter

This is a PostGraphile plugin with enhancements for people who financially support PostGraphile's development. Unlike PostGraphile, this plugin is NOT open source software - see "License key" lower down.

Currently it introduces a simple subscriptions feature; for documentation see:

https://www.graphile.org/postgraphile/subscriptions/

Usage

CLI:

yarn add postgraphile @graphile/supporter
export GRAPHILE_LICENSE="MY_LICENSE_KEY_HERE"
yarn postgraphile --plugins @graphile/supporter --simple-subscriptions

Library:

Assuming you have server.js something like:

// server.js
const http = require("http");
const { postgraphile, makePluginHook } = require("postgraphile");

const pluginHook = makePluginHook([require("@graphile/supporter").default]);

http
  .createServer(
    postgraphile(process.env.DATABASE_URL, "public", {
      pluginHook,
      simpleSubscriptions: true,
    })
  )
  .listen(5000);

Install and run:

yarn add postgraphile @graphile/supporter
export GRAPHILE_LICENSE="MY_LICENSE_KEY_HERE"
node server.js

License key

You must specify the license key in an environmental variable GRAPHILE_LICENSE. You can acquire the license key from https://store.graphile.com

If you fail to provide the license key, then the module will throw an error.

Read more: https://www.graphile.org/postgraphile/plugins/

Package Sidebar

Install

npm i @graphile/supporter

Weekly Downloads

8

Version

0.8.4

License

SEE LICENSE IN LICENSE.md

Unpacked Size

17.1 kB

Total Files

4

Last publish

Collaborators

  • mattbretl
  • benjie