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

parseType

Given a string containing a GraphQL Type (ex. [Int!]), parse the AST for that type. Throws GraphQLError if a syntax error is encountered.

This is useful within tools that operate upon GraphQL Types directly and in isolation of complete GraphQL documents.

Consider providing the results to the utility function: typeFromAST().

function parseType(source: string | Source, options?: ParseOptions | undefined): TypeNode;
§
parseType(source: string | Source, options?: ParseOptions | undefined): TypeNode
[src]

§Parameters

§
source: string | Source
[src]
§
options?: ParseOptions | undefined optional
[src]