Add property for GraphiQL UI path

This commit adds a new `spring.graphql.graphiql.path` configuration
property for setting the path to the GraphiQL UI page.

This change requires updates in the static HTML page to link the
JavaScript fetcher back to the actual GraphQL API endpoint.

Closes gh-70
This commit is contained in:
Brian Clozel
2021-06-29 13:48:48 +02:00
parent 9a4da366aa
commit eef61843d3
7 changed files with 160 additions and 18 deletions

View File

@@ -125,6 +125,9 @@ spring.graphql.schema.location=classpath:graphql/schema.graphqls
# endpoint path is concatenated with the main path, so "/graphql/schema" by default
spring.graphql.schema.printer.enabled=false
spring.graphql.schema.printer.path=/schema
# GraphiQL UI configuration
spring.graphql.graphiql.enabled=true
spring.graphql.graphiql.path=/graphiql
# whether micrometer metrics should be collected for graphql queries
management.metrics.graphql.autotime.enabled=true
````