Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

typeFromAST

Given a Schema and an AST node describing a type, return a GraphQLType definition which applies to that type. For example, if provided the parsed AST node for [User], a GraphQLList instance will be returned, containing the type called "User" found in the schema. If a type called "User" is not found in the schema, then undefined will be returned.

function typeFromAST(schema: GraphQLSchema, typeNode: NamedTypeNode): GraphQLNamedType | undefined;
function typeFromAST(schema: GraphQLSchema, typeNode: ListTypeNode): GraphQLList<any> | undefined;
function typeFromAST(schema: GraphQLSchema, typeNode: NonNullTypeNode): GraphQLNonNull<any> | undefined;
function typeFromAST(schema: GraphQLSchema, typeNode: TypeNode): GraphQLType | undefined;
§
typeFromAST(schema: GraphQLSchema, typeNode: NamedTypeNode): GraphQLNamedType | undefined
[src]

Given a Schema and an AST node describing a type, return a GraphQLType definition which applies to that type. For example, if provided the parsed AST node for [User], a GraphQLList instance will be returned, containing the type called "User" found in the schema. If a type called "User" is not found in the schema, then undefined will be returned.

§Parameters

§Return Type

§
typeFromAST(schema: GraphQLSchema, typeNode: ListTypeNode): GraphQLList<any> | undefined
[src]

§Parameters

§Return Type

§
GraphQLList<any> | undefined
[src]
§
typeFromAST(schema: GraphQLSchema, typeNode: NonNullTypeNode): GraphQLNonNull<any> | undefined
[src]

§Return Type

§
GraphQLNonNull<any> | undefined
[src]
§
typeFromAST(schema: GraphQLSchema, typeNode: TypeNode): GraphQLType | undefined
[src]

§Parameters

§
typeNode: TypeNode
[src]

§Return Type

§
GraphQLType | undefined
[src]