KnownDirectivesRule.d.ts 469 B

12345678910111213141516
  1. import type { ASTVisitor } from '../../language/visitor';
  2. import type {
  3. SDLValidationContext,
  4. ValidationContext,
  5. } from '../ValidationContext';
  6. /**
  7. * Known directives
  8. *
  9. * A GraphQL document is only valid if all `@directives` are known by the
  10. * schema and legally positioned.
  11. *
  12. * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined
  13. */
  14. export declare function KnownDirectivesRule(
  15. context: ValidationContext | SDLValidationContext,
  16. ): ASTVisitor;