2222 height : 100vh ;
2323 overflow : hidden;
2424 }
25-
2625 # voyager {
2726 height : 100% ;
2827 position : relative;
2928 }
30-
31- /* START: GraphQL Java Kickstart Enhancements to support Authorization tokens */
32- # voyager {
33- height : 90vh ;
34- }
35-
36- .authorization {
37- width : 319px ;
38- min-width : 319px ;
39- border-right : 1px solid rgba (0 , 0 , 0 , .1 );
40- }
41-
42- .authorization > .contents {
43- padding-left : 15px ;
44- }
45-
46- .contents > .header {
47- font : 14px 'helvetica neue' , helvetica, arial, sans-serif;
48- font-weight : bold;
49- color : # 666 ;
50- }
51- /* END: GraphQL Java Kickstart Enhancements to support Authorization tokens */
5229 </ style >
5330 </ head >
5431 < body >
55- <!-- START: GraphQL Java Kickstart Enhancements -->
56-
57- < div class ="authorization ">
58- < div class ="contents ">
59- < div class ="header "> Authorization (Access Token)</ div >
60- < div > < input id ="access-token " style ="width: 90%; padding: 6px 0 7px " /> </ div >
61- < div > < button id ="load-token " onclick ="loadVoyager() "> Load!</ button > < button id ="reset-token " style ="display: none " onclick ="resetVoyager() "> Reset</ button > </ div >
62- </ div >
63- </ div >
64-
65- <!-- END: GraphQL Java Kickstart Enhancements -->
6632 < div id ="voyager ">
6733 < div class ="graphql-voyager ">
6834 < div class ="doc-panel ">
@@ -88,13 +54,7 @@ <h1> Transmitting... </h1>
8854 method : 'post' ,
8955 headers : {
9056 'Accept' : 'application/json' ,
91- 'Content-Type' : 'application/json' ,
92-
93- /* START: GraphQL Java Kickstart Enhancements */
94-
95- 'Authorization' : 'Bearer ' + authorizationToken
96-
97- /* END: GraphQL Java Kickstart Enhancements */
57+ 'Content-Type' : 'application/json'
9858 } ,
9959 body : JSON . stringify ( { query : introspectionQuery } ) ,
10060 credentials : 'include'
@@ -110,38 +70,12 @@ <h1> Transmitting... </h1>
11070 }
11171
11272 // Render <Voyager /> into the body.
113- < ! -- GraphQLVoyager . init ( document . getElementById ( 'voyager' ) , { -->
114- <!-- introspection: introspectionProvider,-->
115- <!-- displayOptions: {-->
116- <!-- sortByAlphabet: true,-->
117- <!-- }-->
118- <!-- })-->
119-
120- // Render <Voyager /> into the body.
121- function loadVoyager ( ) {
122- document . getElementsByClassName ( "loading-box" ) [ 0 ] . style . display = "none" ;
123-
124- GraphQLVoyager . init ( document . getElementById ( 'voyager' ) , {
125- introspection : introspectionProvider ,
126- displayOptions : {
127- sortByAlphabet : true ,
128- }
129- } ) ;
130-
131- document . getElementById ( "load-token" ) . style . display = "none" ;
132- document . getElementById ( "reset-token" ) . style . display = "block" ;
133- }
134-
135- /* START: START: GraphQL Java Kickstart Enhancements */
136-
137- // Reset Voyager
138- function resetVoyager ( ) {
139- document . getElementById ( 'access-token' ) . value = '' ;
140-
141- location . reload ( ) ;
142- }
143-
144- /* END: START: GraphQL Java Kickstart Enhancements */
73+ GraphQLVoyager . init ( document . getElementById ( 'voyager' ) , {
74+ introspection : introspectionProvider ,
75+ displayOptions : {
76+ sortByAlphabet : true ,
77+ }
78+ } )
14579 </ script >
14680 </ body >
14781</ html >
0 commit comments