Skip to content

Commit a70e525

Browse files
committed
Fix formatting
1 parent 10ebbe9 commit a70e525

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

spring-graphql/src/main/java/org/springframework/graphql/web/webflux/GraphQlHttpHandler.java

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,26 @@ public GraphQlHttpHandler(WebGraphQlHandler graphQlHandler) {
6161
* @return the HTTP response
6262
*/
6363
public Mono<ServerResponse> handleRequest(ServerRequest request) {
64-
return request.bodyToMono(MAP_PARAMETERIZED_TYPE_REF).flatMap((body) -> {
65-
String id = request.exchange().getRequest().getId();
66-
WebInput input = new WebInput(request.uri(), request.headers().asHttpHeaders(), body, id);
67-
if (logger.isDebugEnabled()) {
68-
logger.debug("Executing: " + input);
69-
}
70-
return this.graphQlHandler.handle(input);
71-
}).flatMap((output) -> {
72-
Map<String, Object> spec = output.toSpecification();
73-
if (logger.isDebugEnabled()) {
74-
logger.debug("Execution complete");
75-
}
76-
ServerResponse.BodyBuilder builder = ServerResponse.ok();
77-
if (output.getResponseHeaders() != null) {
78-
builder.headers((headers) -> headers.putAll(output.getResponseHeaders()));
79-
}
80-
return builder.bodyValue(spec);
81-
});
64+
return request.bodyToMono(MAP_PARAMETERIZED_TYPE_REF)
65+
.flatMap((body) -> {
66+
String id = request.exchange().getRequest().getId();
67+
WebInput input = new WebInput(request.uri(), request.headers().asHttpHeaders(), body, id);
68+
if (logger.isDebugEnabled()) {
69+
logger.debug("Executing: " + input);
70+
}
71+
return this.graphQlHandler.handle(input);
72+
})
73+
.flatMap((output) -> {
74+
Map<String, Object> spec = output.toSpecification();
75+
if (logger.isDebugEnabled()) {
76+
logger.debug("Execution complete");
77+
}
78+
ServerResponse.BodyBuilder builder = ServerResponse.ok();
79+
if (output.getResponseHeaders() != null) {
80+
builder.headers((headers) -> headers.putAll(output.getResponseHeaders()));
81+
}
82+
return builder.bodyValue(spec);
83+
});
8284
}
8385

8486
}

0 commit comments

Comments
 (0)