diff --git a/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/GraphQLContextFactory.kt b/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/GraphQLContextFactory.kt index cce6a40..9666713 100644 --- a/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/GraphQLContextFactory.kt +++ b/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/GraphQLContextFactory.kt @@ -23,7 +23,9 @@ import org.springframework.web.reactive.function.server.ServerRequest */ @Component class GraphQLContextFactory : DefaultSpringGraphQLContextFactory() { - override suspend fun generateContextMap(request: ServerRequest): Map<*, Any> = super.generateContextMap(request) + mapOf( - "myCustomValue" to (request.headers().firstHeader("MyHeader") ?: "defaultContext") - ) + override suspend fun generateContextMap(request: ServerRequest): Map<*, Any> { + return super.generateContextMap(request) + mapOf( + "myCustomValue" to (request.headers().firstHeader("MyHeader") ?: "defaultContext") + ) + } }