UNPKG

492 BTypeScriptView Raw
1import type { ASTVisitor } from '../../language/visitor';
2import type { ASTValidationContext } from '../ValidationContext';
3/**
4 * Lone anonymous operation
5 *
6 * A GraphQL document is only valid if when it contains an anonymous operation
7 * (the query short-hand) that it contains only that one operation definition.
8 *
9 * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation
10 */
11export declare function LoneAnonymousOperationRule(
12 context: ASTValidationContext,
13): ASTVisitor;