How to use the altair-express-middleware.altairExpress function in altair-express-middleware

To help you get started, we’ve selected a few altair-express-middleware examples, based on popular ways it is used in public projects.

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 1 day ago

Package Health Score

89 / 100
Full package analysis

Popular altair-express-middleware functions

Similar packages