Hi All,
We are seeing the following message logged in our application every few minutes:
[INFO] Subscriptions are disabled.
This is filling up our logs and also fairly distracting. I did some digging around and I think this might be due to an aggressive logging decision done by the framework.
We have a fairly prototypical graphql.ts
, that looks something like this:
export const handler = createGraphQLHandler({
getCurrentUser,
authDecoder,
loggerConfig: {
logger,
options: { operationName: true, query: true, tracing: true },
},
...
})
I noticed that createGraphQLHandler()
calls createGraphQLYoga()
without providing it a realtime
parameter.
As a result the code here will always log the info.
Also copied below:
if (realtime?.subscriptions?.subscriptions) {
defaultAllowedOperations.push(OperationTypeNode.SUBSCRIPTION)
} else {
logger.info('Subscriptions are disabled.')
}
I’m not to familiar when this handler is called, but I presume whenever a we need to getCurrentUser()
, we will log this unnecessary message.
Are we doing something wrong on our end to prompt this routine info log, or is this indeed an aggressive log?