Skip to content

Commit 3e89cc6

Browse files
committed
fix reading GET requests
1 parent 86f9948 commit 3e89cc6

File tree

1 file changed

+4
-1
lines changed
  • apollo-execution-spring/src/jvmMain/kotlin/com/apollographql/execution/spring

1 file changed

+4
-1
lines changed

apollo-execution-spring/src/jvmMain/kotlin/com/apollographql/execution/spring/main.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import org.springframework.web.reactive.function.server.*
99

1010
suspend fun ServerRequest.parseAsGraphQLRequest(): Result<GraphQLRequest> {
1111
return when (this.method()) {
12-
HttpMethod.GET -> this.queryParams().parseAsGraphQLRequest()
12+
HttpMethod.GET -> this.queryParams().toExternalValueMap().fold(
13+
onSuccess = { it.parseAsGraphQLRequest() },
14+
onFailure = { Result.failure(it) }
15+
)
1316
HttpMethod.POST -> {
1417
awaitBody<String>().let {
1518
Buffer().writeUtf8(it).parseAsGraphQLRequest()

0 commit comments

Comments
 (0)