|
|
|
|
@ -112,9 +112,9 @@ public class GraphQlWebMvcAutoConfiguration {
@@ -112,9 +112,9 @@ public class GraphQlWebMvcAutoConfiguration {
|
|
|
|
|
String path = properties.getPath(); |
|
|
|
|
logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path)); |
|
|
|
|
RouterFunctions.Builder builder = RouterFunctions.route(); |
|
|
|
|
builder = builder.GET(path, this::onlyAllowPost); |
|
|
|
|
builder = builder.POST(path, RequestPredicates.contentType(MediaType.APPLICATION_JSON) |
|
|
|
|
.and(RequestPredicates.accept(SUPPORTED_MEDIA_TYPES)), httpHandler::handleRequest); |
|
|
|
|
builder = builder.GET(path, this::onlyAllowPost); |
|
|
|
|
if (properties.getGraphiql().isEnabled()) { |
|
|
|
|
GraphiQlHandler graphiQLHandler = new GraphiQlHandler(path, properties.getWebsocket().getPath()); |
|
|
|
|
builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); |
|
|
|
|
|