@graphql-tools/graphql
Version:
Fork of GraphQL.js
9 lines (8 loc) • 459 B
text/typescript
import type { Maybe } from '../jsutils/Maybe.cjs';
import type { DocumentNode, OperationDefinitionNode } from '../language/ast.cjs';
/**
* 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.
*/
export declare function getOperationAST(documentAST: DocumentNode, operationName?: Maybe<string>): Maybe<OperationDefinitionNode>;