@@ -64,13 +64,16 @@ const graphQLController: GqlController = {
6464 // send reqRes object to main process through context bridge
6565 this . sendGqlToMain ( { reqResObj } )
6666 . then ( ( response ) => {
67- if ( response . error )
67+ if ( response . error ) {
6868 this . handleError ( response . reqResObj . error , response . reqResObj ) ;
69+ }
70+
6971 else this . handleResponse ( response . data , response . reqResObj ) ;
7072 } )
7173 . catch ( ( err ) => console . log ( 'error in sendGqlToMain' , err ) ) ;
7274 } ,
7375
76+
7477 openGraphQLConnectionAndRunCollection ( reqResArray : ReqRes [ ] ) : void {
7578 // initialize response data
7679 let index = 0 ;
@@ -102,7 +105,7 @@ const graphQLController: GqlController = {
102105 } ) ;
103106
104107 const runSingleGraphQLRequest = ( reqResObj : ReqRes ) => {
105- reqResObj . response . headers = { } ;
108+ reqResObj . response . headers = { } ;
106109 reqResObj . response . events = [ ] ;
107110 reqResObj . response . cookies = [ ] ;
108111 reqResObj . connection = 'open' ;
@@ -294,7 +297,7 @@ const graphQLController: GqlController = {
294297 } ;
295298 api . send ( 'introspect' , JSON . stringify ( introspectionObject ) ) ;
296299 api . receive ( 'introspect-reply' , ( data : IntrospectionQuery ) => {
297- console . log ( data ) ;
300+ // console.log(data);
298301 if ( data !== 'Error: Please enter a valid GraphQL API URI' ) {
299302 // formatted for Codemirror hint and lint
300303 const clientSchema = buildClientSchema ( data ) ;
0 commit comments