diff --git a/README.md b/README.md index d6ca385..6a83f7f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ GraphQL SPQR Spring Boot starter aims to make it dead simple to add a GraphQL API to any Spring Boot project. * Add `@GraphQLApi` to any Spring managed component, and you're good to go 🚀 * GraphQL endpoint available at `/graphql` by default - * GraphQL Playground IDE (if enabled, see the properties below) available at `/ide` + * GraphiQL (if enabled, see the properties below) available at `/gui` * Fully customizable in seconds by providing simple beans (any SPQR SPI can be exposed as a bean) ## Project setup / Dependencies @@ -230,7 +230,7 @@ To do this SPQR uses `TypeInfoGenerator` on a global level. When using this star | graphql.spqr.gui.endpoint | /gui | | graphql.spqr.gui.target-endpoint | n/a | | graphql.spqr.gui.target-ws-endpoint | n/a | -| graphql.spqr.gui.page-title | GraphQL Playground | +| graphql.spqr.gui.page-title | GraphiQL | ### Customize mapping of GraphQL values to Java values diff --git a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/autoconfigure/SpqrProperties.java b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/autoconfigure/SpqrProperties.java index 2c940e4..32afc99 100644 --- a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/autoconfigure/SpqrProperties.java +++ b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/autoconfigure/SpqrProperties.java @@ -279,7 +279,7 @@ public static class Gui { private String endpoint = DEFAULT_GUI_ENDPOINT; private String targetEndpoint; private String targetWsEndpoint; - private String pageTitle = "GraphQL Playground"; + private String pageTitle = "GraphiQL"; public boolean isEnabled() { return enabled; diff --git a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GuiController.java b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GuiController.java index 9652e7f..ac272e5 100644 --- a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GuiController.java +++ b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GuiController.java @@ -22,7 +22,7 @@ public GuiController(SpqrProperties config) { @ResponseBody @RequestMapping(value = "${graphql.spqr.gui.endpoint:/gui}", produces = "text/html; charset=utf-8") public String gui() throws IOException { - return StreamUtils.copyToString(new ClassPathResource("playground.html").getInputStream(), StandardCharsets.UTF_8) + return StreamUtils.copyToString(new ClassPathResource("graphiql.html").getInputStream(), StandardCharsets.UTF_8) .replace("${pageTitle}", config.getGui().getPageTitle()) .replace("${graphQLEndpoint}", config.getGui().getTargetEndpoint()) .replace("${webSocketEndpoint}", config.getGui().getTargetWsEndpoint()); diff --git a/graphql-spqr-spring-boot-autoconfigure/src/main/resources/graphiql.html b/graphql-spqr-spring-boot-autoconfigure/src/main/resources/graphiql.html new file mode 100644 index 0000000..f410ec0 --- /dev/null +++ b/graphql-spqr-spring-boot-autoconfigure/src/main/resources/graphiql.html @@ -0,0 +1,83 @@ + + + + + ${pageTitle} + + + + + + + + + + + + + + +
Loading...
+ + + diff --git a/graphql-spqr-spring-boot-autoconfigure/src/main/resources/playground.html b/graphql-spqr-spring-boot-autoconfigure/src/main/resources/playground.html deleted file mode 100644 index cc5c2e2..0000000 --- a/graphql-spqr-spring-boot-autoconfigure/src/main/resources/playground.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - ${pageTitle} - - - - - - -
- - -
Loading - GraphQL Playground -
-
- - - - \ No newline at end of file