Skip to content

Commit

Permalink
Do not log ping messages (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda authored Oct 16, 2023
1 parent a449a01 commit c56bdea
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,19 @@ class ApolloSubscriptionProtocolHandler(

fun handleMessage(context: WsMessageContext): Flow<SubscriptionOperationMessage> {
val operationMessage = convertToMessageOrNull(context.message()) ?: return flowOf(basicConnectionErrorMessage)
logger.debug {
"GraphQL subscription client message, sessionId=${context.sessionId} type=${operationMessage.type} operationName=${
getOperationName(operationMessage.payload)
} ${
if (serverConfig.gqlDebugLogsEnabled.value) {
"operationMessage=$operationMessage"
} else {
""
}
}"

if (operationMessage.type != GQL_PING.type) {
logger.debug {
"GraphQL subscription client message, sessionId=${context.sessionId} type=${operationMessage.type} operationName=${
getOperationName(operationMessage.payload)
} ${
if (serverConfig.gqlDebugLogsEnabled.value) {
"operationMessage=$operationMessage"
} else {
""
}
}"
}
}

return try {
Expand Down

0 comments on commit c56bdea

Please sign in to comment.