From fc794f17e125650d9b0c22338cf023ac1ce3225f Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 10 Jan 2022 18:27:50 +0100 Subject: [PATCH] Update GraphiQlHandler configuration This commit updates the `GraphiQlHandler` auto-configuration after a constructor change was done in Spring GraphQL for WebSocket support in GraphiQL. --- .../graphql/reactive/GraphQlWebFluxAutoConfiguration.java | 2 +- .../graphql/servlet/GraphQlWebMvcAutoConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java index b7f8136d7f..a9949d1fca 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java @@ -111,7 +111,7 @@ public class GraphQlWebFluxAutoConfiguration { handler::handleRequest); if (properties.getGraphiql().isEnabled()) { - GraphiQlHandler graphiQlHandler = new GraphiQlHandler(graphQLPath); + GraphiQlHandler graphiQlHandler = new GraphiQlHandler(graphQLPath, properties.getWebsocket().getPath()); builder = builder.GET(properties.getGraphiql().getPath(), graphiQlHandler::handleRequest); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java index fd5a2210fe..bf0b4e260c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java @@ -118,7 +118,7 @@ public class GraphQlWebMvcAutoConfiguration { .and(RequestPredicates.accept(MediaType.APPLICATION_JSON)), handler::handleRequest); if (properties.getGraphiql().isEnabled()) { - GraphiQlHandler graphiQLHandler = new GraphiQlHandler(graphQLPath); + GraphiQlHandler graphiQLHandler = new GraphiQlHandler(graphQLPath, properties.getWebsocket().getPath()); builder = builder.GET(properties.getGraphiql().getPath(), graphiQLHandler::handleRequest); }