How to use altair-express-middleware - 1 common examples

To help you get started, we’ve selected a few altair-express-middleware 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 open-app / open-app-graphql-server / graphql.js View on Github external
module.exports = (sbot, plugins, opts) => {
  const app = express()
  let schemas = []
  plugins.map((pl, index) => schemas.push(makeExecutableSchema(pl)))
  const schema = mergeSchemas({
    schemas,
  })
  app.use('/graphql', bodyParser.json(), graphqlExpress({ schema, context: { pubsub, sbot }}))
  app.use('/playground', altairExpress({
    endpointURL: `/graphql`,
    subscriptionsEndpoint: `ws://localhost:${PORT}/subscriptions`
  }))

  app.listen(PORT, () => {
    console.log('Started GraphQL server at', PORT)
  })
}

altair-express-middleware

Express middleware for altair graphql client

MIT
Latest version published 6 days ago

Package Health Score

89 / 100
Full package analysis

Popular altair-express-middleware functions