File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
graphql-jpa-query-graphiql/src/main
java/com/introproventures/graphql/jpa/query/graphiql
resources/static/graphiql Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
package com .introproventures .graphql .jpa .query .graphiql ;
2
2
3
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
3
4
import org .springframework .boot .autoconfigure .condition .ConditionalOnWebApplication ;
4
5
import org .springframework .context .annotation .Bean ;
5
6
import org .springframework .context .annotation .Configuration ;
11
12
public class WebMvcViewControllerConfigurer {
12
13
13
14
@ Bean
14
- public WebMvcConfigurer graphqiQLRedirectToIndex () {
15
+ @ ConditionalOnMissingBean (name = "graphiqlViewController" )
16
+ public WebMvcConfigurer graphiqlViewController () {
15
17
return new WebMvcConfigurer () {
16
18
@ Override
17
19
public void addViewControllers (ViewControllerRegistry registry ) {
18
- registry .addRedirectViewController ("/graphiql" , "graphiql/index.html" );
20
+ registry .addViewController ("/graphiql" )
21
+ .setViewName ("forward:/graphiql/index.html" );
19
22
}
20
23
};
21
24
}
Original file line number Diff line number Diff line change 8
8
<!DOCTYPE html>
9
9
< html >
10
10
< head >
11
- < base href ="./ " />
12
11
< style >
13
12
body {
14
13
height : 100% ;
38
37
copy them directly into your environment, or perhaps include them in your
39
38
favored resource bundler.
40
39
-->
41
- < link rel ="stylesheet " href ="graphiql.css " />
42
- < script src ="graphiql.js "> </ script >
40
+ < link rel ="stylesheet " href ="graphiql/graphiql .css " />
41
+ < script src ="graphiql/graphiql .js "> </ script >
43
42
44
43
</ head >
45
44
< body >
You can’t perform that action at this time.
0 commit comments