|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2023 the original author or authors. |
| 2 | + * Copyright 2012-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -112,16 +112,16 @@ public RouterFunction<ServerResponse> graphQlRouterFunction(GraphQlHttpHandler h
|
112 | 112 | String path = properties.getPath();
|
113 | 113 | logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path));
|
114 | 114 | RouterFunctions.Builder builder = RouterFunctions.route();
|
115 |
| - builder = builder.GET(path, this::onlyAllowPost); |
116 |
| - builder = builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON) |
| 115 | + builder.GET(path, this::onlyAllowPost); |
| 116 | + builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON) |
117 | 117 | .and(RequestPredicates.accept(SUPPORTED_MEDIA_TYPES)), httpHandler::handleRequest);
|
118 | 118 | if (properties.getGraphiql().isEnabled()) {
|
119 | 119 | GraphiQlHandler graphiQLHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath());
|
120 |
| - builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); |
| 120 | + builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); |
121 | 121 | }
|
122 | 122 | if (properties.getSchema().getPrinter().isEnabled()) {
|
123 | 123 | SchemaHandler schemaHandler = new SchemaHandler(graphQlSource);
|
124 |
| - builder = builder.GET(path + "/schema", schemaHandler::handleRequest); |
| 124 | + builder.GET(path + "/schema", schemaHandler::handleRequest); |
125 | 125 | }
|
126 | 126 | return builder.build();
|
127 | 127 | }
|
|
0 commit comments