diff --git a/src/execution/execute.d.ts b/src/execution/execute.d.ts index a20db8c224..af2d39947d 100644 --- a/src/execution/execute.d.ts +++ b/src/execution/execute.d.ts @@ -89,8 +89,14 @@ export interface ExecutionArgs { * * Accepts either an object with named arguments, or individual arguments. */ -export function execute(args: ExecutionArgs): PromiseOrValue; -export function execute( +export function execute< + TData = { [key: string]: any }, + TExtensions = { [key: string]: any } +>(args: ExecutionArgs): PromiseOrValue>; +export function execute< + TData = { [key: string]: any }, + TExtensions = { [key: string]: any } +>( schema: GraphQLSchema, document: DocumentNode, rootValue?: any, @@ -99,14 +105,17 @@ export function execute( operationName?: Maybe, fieldResolver?: Maybe>, typeResolver?: Maybe>, -): PromiseOrValue; +): PromiseOrValue>; /** * Also implements the "Evaluating requests" section of the GraphQL specification. * However, it guarantees to complete synchronously (or throw an error) assuming * that all field resolvers are also synchronous. */ -export function executeSync(args: ExecutionArgs): ExecutionResult; +export function executeSync< + TData = { [key: string]: any }, + TExtensions = { [key: string]: any } +>(args: ExecutionArgs): ExecutionResult; /** * Essential assertions before executing to provide developer feedback for