From dc203ae81c257bb777891cd1e563dadfb821186d Mon Sep 17 00:00:00 2001 From: Luis Felipe Zaguini <26530524+zaguiini@users.noreply.github.com> Date: Thu, 21 May 2020 16:30:27 -0300 Subject: [PATCH] [graphql-resolvers] Fix argument types (#44919) --- types/graphql-resolvers/index.d.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/types/graphql-resolvers/index.d.ts b/types/graphql-resolvers/index.d.ts index e03cdd561e11540..11bdc10eedba403 100644 --- a/types/graphql-resolvers/index.d.ts +++ b/types/graphql-resolvers/index.d.ts @@ -1,11 +1,20 @@ -// Type definitions for graphql-resolvers 0.2 +// Type definitions for graphql-resolvers 0.3 // Project: https://github.com/lucasconstantino/graphql-resolvers#readme -// Definitions by: Mike Engel -// Alejandro Corredor +// Definitions by: Alejandro Corredor +// Luis Felipe Zaguini +// Mike Engel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -import { IFieldResolver } from "graphql-tools"; +import { GraphQLResolveInfo } from "graphql"; +import { MergeInfo } from "graphql-tools"; + +export type IFieldResolver, TReturn = any> = ( + source: TSource, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo & { mergeInfo?: MergeInfo }, +) => TReturn; export const skip: undefined;