Skip to content
Snippets Groups Projects
Commit b7359ae6 authored by Yannis Barlas's avatar Yannis Barlas
Browse files

fix(server): do not load subscriptions if gql is off

parent bec477e5
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ const configureApp = app => {
useGraphQLServer = false
}
logger.warn('useGraphQLServer', useGraphQLServer)
logger.info('useGraphQLServer', useGraphQLServer)
if (useGraphQLServer) {
const gqlApi = require('./graphqlApi')
......@@ -138,10 +138,12 @@ const configureApp = app => {
// Actions to perform when the HTTP server starts listening
app.onListen = async server => {
const {
addSubscriptions,
} = require('pubsweet-server/src/graphql/subscriptions')
addSubscriptions(server) // Add GraphQL subscriptions
if (useGraphQLServer) {
const {
addSubscriptions,
} = require('pubsweet-server/src/graphql/subscriptions')
addSubscriptions(server) // Add GraphQL subscriptions
}
const { startJobQueue } = require('pubsweet-server/src/jobs')
await startJobQueue() // Manage job queue
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment