Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 6320bbd

Browse files
authored
Merge pull request #143 from graphql-java-kickstart/bugfix/130-graphiql-mapping
Bugfix/130 graphiql mapping
2 parents 2e44461 + 3f7f9d6 commit 6320bbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphiql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphiql/boot/GraphiQLController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ private Map<String, String> getReplacements(String graphqlEndpoint, String subsc
109109
replacements.put("subscriptionsEndpoint", subscriptionsEndpoint);
110110
replacements.put("staticBasePath", staticBasePath);
111111
replacements.put("pageTitle", pageTitle);
112-
replacements.put("graphiqlCssUrl", graphiqlUrl("graphiql.min.css"));
113-
replacements.put("graphiqlJsUrl", graphiqlUrl("graphiql.min.js"));
112+
replacements.put("graphiqlCssUrl", graphiqlUrl(staticBasePath, "graphiql.min.css"));
113+
replacements.put("graphiqlJsUrl", graphiqlUrl(staticBasePath, "graphiql.min.js"));
114114
replacements.put("props", props);
115115
replacements.put("headers", headers);
116116
return replacements;
117117
}
118118

119-
private String graphiqlUrl(String filename) {
119+
private String graphiqlUrl(String staticBasePath, String filename) {
120120
if (graphiqlCdnEnabled && StringUtils.isNotBlank(graphiqlCdnVersion)) {
121121
return CDNJS_CLOUDFLARE_COM_AJAX_LIBS_GRAPHIQL + graphiqlCdnVersion + "/" + filename;
122122
}

0 commit comments

Comments
 (0)