From ce6747ccd6aca878be3be671cba693a874e5b174 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 21 Dec 2021 08:33:31 +0100 Subject: [PATCH] Enable GraphiQL UI by default with Devtools GraphiQL is useful when working on a GraphQL API - it allows developers to craft queries and test newly developed feature. This is not enabled by default, as this should not be exposed in production without the developer's knowledge. This commit flips this value when Spring Boot devtools is active for a better developer experience. See gh-29140 --- .../boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java index bd99a3e21c..8a4852b702 100755 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java @@ -63,6 +63,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro Map properties = new HashMap<>(); properties.put("spring.thymeleaf.cache", "false"); properties.put("spring.freemarker.cache", "false"); + properties.put("spring.graphql.graphiql.enabled", "true"); properties.put("spring.groovy.template.cache", "false"); properties.put("spring.mustache.cache", "false"); properties.put("server.servlet.session.persistent", "true");