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;