How to use the postgraphile.enhanceHttpServerWithSubscriptions 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 / bootstrap-react-apollo / server / middleware / installPostGraphile.js View on Github external
* have some issues.
   */
  const websocketMiddlewares = app.get("websocketMiddlewares");

  // Install the PostGraphile middleware
  const middleware = postgraphile(
    authPgPool,
    "app_public",
    postgraphileOptions({
      websocketMiddlewares,
    })
  );
  app.use(middleware);

  if (enhanceHttpServerWithSubscriptions) {
    enhanceHttpServerWithSubscriptions(httpServer, middleware);
  }
};

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