This repository was archived by the owner on Mar 20, 2023. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ import { renderGraphiQL } from './renderGraphiQL';
3333type  Request  =  IncomingMessage  &  {  url : string  } ; 
3434
3535type  Response  =  ServerResponse  &  {  json ?: ( data : unknown )  =>  void } ; 
36- type  MaybePromise < T >  =  Promise < T >  |  T ; 
36+ 
37+ type  PromiseOrValue < T >  =  Promise < T >  |  T ; 
3738
3839/** 
3940 * Used to configure the graphqlHTTP middleware by providing a schema 
@@ -47,8 +48,8 @@ export type Options =
4748      request : Request , 
4849      response : Response , 
4950      params ?: GraphQLParams , 
50-     )  =>  MaybePromise < OptionsData > ) 
51-   |  MaybePromise < OptionsData > ; 
51+     )  =>  PromiseOrValue < OptionsData > ) 
52+   |  PromiseOrValue < OptionsData > ; 
5253
5354export  interface  OptionsData  { 
5455  /** 
@@ -91,7 +92,7 @@ export interface OptionsData {
9192   * An optional function which will be used to execute instead of default `execute` 
9293   * from `graphql-js`. 
9394   */ 
94-   customExecuteFn ?: ( args : ExecutionArgs )  =>  MaybePromise < ExecutionResult > ; 
95+   customExecuteFn ?: ( args : ExecutionArgs )  =>  PromiseOrValue < ExecutionResult > ; 
9596
9697  /** 
9798   * An optional function which will be used to format any errors produced by 
@@ -124,7 +125,7 @@ export interface OptionsData {
124125   */ 
125126  extensions ?: ( 
126127    info : RequestInfo , 
127-   )  =>  MaybePromise < undefined  |  {  [ key : string ] : unknown  } > ; 
128+   )  =>  PromiseOrValue < undefined  |  {  [ key : string ] : unknown  } > ; 
128129
129130  /** 
130131   * A boolean to optionally enable GraphiQL mode. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments