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

getOperationAST

Returns an operation AST given a document AST and optionally an operation name. If a name is not provided, an operation is only returned if only one is provided in the document.

function getOperationAST(documentAST: DocumentNode, operationName?: Maybe<string>): Maybe<OperationDefinitionNode>;
§
getOperationAST(documentAST: DocumentNode, operationName?: Maybe<string>): Maybe<OperationDefinitionNode>
[src]

§Parameters

§
documentAST: DocumentNode
[src]
§
operationName?: Maybe<string> optional
[src]