UNPKG

478 BTypeScriptView Raw
1import type { ASTVisitor } from '../../language/visitor';
2import type { ASTValidationContext } from '../ValidationContext';
3/**
4 * No unused fragments
5 *
6 * A GraphQL document is only valid if all fragment definitions are spread
7 * within operations, or spread within other fragments spread within operations.
8 *
9 * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used
10 */
11export declare function NoUnusedFragmentsRule(
12 context: ASTValidationContext,
13): ASTVisitor;