Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
console.log();
console.log(
`Please support PostGraphile development:\n\n ${chalk.blue.bold.underline(
"https://graphile.org/donate"
)} 🙏`
);
console.log();
}
/* eslint-enable */
const isDev = process.env.NODE_ENV === "development";
const isTest = process.env.NODE_ENV === "test";
/* Load any PostGraphile server plugins (different from Graphile Engine schema plugins) */
const pluginHook = makePluginHook([PgPubsub, PostGraphilePro].filter(_ => _));
/*
* This function generates the options for a PostGraphile instance to use. We
* make it a separate function call so that we may call it from other places
* (such as tests) and even parameterise it if we want.
*/
function postgraphileOptions(overrides) {
return {
// This is for PostGraphile server plugins: https://www.graphile.org/postgraphile/plugins/
pluginHook,
// This is so that PostGraphile installs the watch fixtures, it's also needed to enable live queries
ownerConnectionString: process.env.DATABASE_URL,
// Add websocket support to the PostGraphile server; you still need to use a subscriptions plugin such as
// @graphile/pg-pubsub