@@ -24,19 +24,16 @@ export default class Demo extends React.Component {
2424
2525 const { url, withCredentials } = getQueryParams ( ) ;
2626 if ( url ) {
27- this . state . introspection = introspectionQuery => fetch ( url , {
28- method : 'post' ,
29- headers : {
30- 'Accept' : 'application/json' ,
31- 'Content-Type' : 'application/json' ,
32- } ,
33- body : JSON . stringify ( { query : introspectionQuery } ) ,
34- ...(
35- withCredentials === 'true'
36- ? { credentials : 'include' , mode : 'cors' }
37- : { }
38- ) ,
39- } ) . then ( response => response . json ( ) ) ;
27+ this . state . introspection = introspectionQuery =>
28+ fetch ( url , {
29+ method : 'post' ,
30+ headers : {
31+ Accept : 'application/json' ,
32+ 'Content-Type' : 'application/json' ,
33+ } ,
34+ body : JSON . stringify ( { query : introspectionQuery } ) ,
35+ ...( withCredentials === 'true' ? { credentials : 'include' , mode : 'cors' } : { } ) ,
36+ } ) . then ( response => response . json ( ) ) ;
4037 }
4138 }
4239
@@ -54,7 +51,7 @@ export default class Demo extends React.Component {
5451 < Logo />
5552 < Button
5653 color = "primary"
57- style = { { color : 'white' } }
54+ style = { { color : 'white' } }
5855 variant = "contained"
5956 className = "choosebutton"
6057 onClick = { openChangeSchema }
@@ -67,7 +64,7 @@ export default class Demo extends React.Component {
6764 < IntrospectionModal
6865 open = { changeSchemaModalOpen }
6966 onClose = { closeChangeSchema }
70- onChange = { ( introspection ) => this . setState ( { introspection } ) }
67+ onChange = { introspection => this . setState ( { introspection } ) }
7168 />
7269 </ MuiThemeProvider >
7370 ) ;
0 commit comments