diff --git a/src/app.js b/src/app.js index 187d726cbcc3f8c683be0d39024224e0b274420c..e3cb1f665bcd0c469ef149680d8db8d10932a3ea 100644 --- a/src/app.js +++ b/src/app.js @@ -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