Skip to content

Commit 74e3d0c

Browse files
authored
fix(ktor-server): move plugin install to routing context (#1684)
### 📝 Description Fixes that a plugin is applied globally, which is not really needed in this context ### 🔗 Related Issues fixes #1683
1 parent f59bc9b commit 74e3d0c

File tree

1 file changed

+6
-6
lines changed
  • servers/graphql-kotlin-ktor-server/src/main/kotlin/com/expediagroup/graphql/server/ktor

1 file changed

+6
-6
lines changed

servers/graphql-kotlin-ktor-server/src/main/kotlin/com/expediagroup/graphql/server/ktor/GraphQL.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ class GraphQL(config: GraphQLConfiguration) {
145145
pipeline.log.info("\n${plugin.schema.print()}")
146146
}
147147

148-
// install content negotiation
149-
pipeline.install(ContentNegotiation) {
150-
jackson(streamRequestBody = config.server.streamingResponse) {
151-
apply(config.server.jacksonConfiguration)
152-
}
153-
}
154148
// install routing
155149
pipeline.routing {
150+
// install content negotiation
151+
install(ContentNegotiation) {
152+
jackson(streamRequestBody = config.server.streamingResponse) {
153+
apply(config.server.jacksonConfiguration)
154+
}
155+
}
156156
get(config.routes.endpoint) {
157157
plugin.server.executeRequest(call)
158158
}

0 commit comments

Comments
 (0)