Skip to content

Commit

Permalink
Fix issues with graphiql on reactive DGS
Browse files Browse the repository at this point in the history
  • Loading branch information
foo4u committed Oct 19, 2022
1 parent 3e0b0a8 commit 9fdc12a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
Expand Up @@ -48,6 +48,7 @@ class DgsWebfluxConfigurationProperties(
* Configuration properties for the GraphiQL endpoint.
*/
data class DgsGraphiQLConfigurationProperties(
@DefaultValue("true") var enabled: Boolean = true,
/** Path to the GraphiQL endpoint without trailing slash. */
@DefaultValue("/graphiql") var path: String = "/graphiql",
/** GraphiQL title */
Expand Down
Expand Up @@ -35,7 +35,7 @@ class GraphiQlConfigurer(private val configProps: DgsWebfluxConfigurationPropert
val graphiQLTitle = configProps.graphiql.title
registry
.addResourceHandler(configProps.graphiql.path + "/**")
.addResourceLocations("classpath:/static/graphiql/")
.addResourceLocations("classpath:/graphiql/")
.resourceChain(true)
.addResolver(PathResourceResolver())
.addTransformer(TokenReplacingTransformer(mapOf("<DGS_GRAPHQL_PATH>" to graphqlPath, "<DGS_GRAPHIQL_TITLE>" to graphiQLTitle), configProps))
Expand Down

0 comments on commit 9fdc12a

Please sign in to comment.