diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index 9eef11de76..95c7bc5b37 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for graphql v0.8.2 +// Type definitions for graphql v0.9.1 // Project: https://www.npmjs.com/package/graphql // Definitions by: TonyYang , Caleb Meredith , Dominic Watson , Firede // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 6fef914d8e..3d6beae33d 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -126,6 +126,10 @@ export type GraphQLNamedType = GraphQLEnumType | GraphQLInputObjectType; +export function isNamedType(type: GraphQLType): boolean; + +export function assertNamedType(type: GraphQLType): GraphQLNamedType; + export function getNamedType(type: GraphQLType): GraphQLNamedType; /** @@ -237,13 +241,13 @@ export type GraphQLTypeResolver = ( value: TSource, context: TContext, info: GraphQLResolveInfo -) => GraphQLObjectType; +) => GraphQLObjectType | string | Promise; export type GraphQLIsTypeOfFn = ( source: TSource, context: TContext, info: GraphQLResolveInfo -) => boolean; +) => boolean | Promise; export type GraphQLFieldResolver = ( source: TSource,