fix: modules non-string config + live trail logging

This commit is contained in:
Nicolas Giard
2018-09-30 14:20:26 -04:00
parent 32a537ec06
commit 904e2a6efb
18 changed files with 141 additions and 37 deletions

View File

@@ -129,7 +129,13 @@ module.exports = async () => {
const graphqlSchema = require('./graph')
const apolloServer = new ApolloServer({
...graphqlSchema,
context: ({ req, res }) => ({ req, res })
context: ({ req, res }) => ({ req, res }),
subscriptions: {
onConnect: (connectionParams, webSocket) => {
},
path: '/graphql-subscriptions'
}
})
apolloServer.applyMiddleware({ app })
@@ -169,6 +175,7 @@ module.exports = async () => {
app.set('port', WIKI.config.port)
WIKI.server = http.createServer(app)
apolloServer.installSubscriptionHandlers(WIKI.server)
WIKI.server.listen(WIKI.config.port, WIKI.config.bindIP)
WIKI.server.on('error', (error) => {