mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
add isNamedType & assertNamedType.
promisify isTypeOf and resolveType.
This commit is contained in:
Vendored
+1
-1
@@ -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 <https://github.com/TonyPythoneer>, Caleb Meredith <https://github.com/calebmer>, Dominic Watson <https://github.com/intellix>, Firede <https://github.com/firede>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Vendored
+6
-2
@@ -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<TSource, TContext> = (
|
||||
value: TSource,
|
||||
context: TContext,
|
||||
info: GraphQLResolveInfo
|
||||
) => GraphQLObjectType;
|
||||
) => GraphQLObjectType | string | Promise<GraphQLObjectType | string>;
|
||||
|
||||
export type GraphQLIsTypeOfFn<TSource, TContext> = (
|
||||
source: TSource,
|
||||
context: TContext,
|
||||
info: GraphQLResolveInfo
|
||||
) => boolean;
|
||||
) => boolean | Promise<boolean>;
|
||||
|
||||
export type GraphQLFieldResolver<TSource, TContext> = (
|
||||
source: TSource,
|
||||
|
||||
Reference in New Issue
Block a user