NoSchemaIntrospectionCustomRule.d.ts 614 B

12345678910111213141516
  1. import { ASTVisitor } from '../../../language/visitor';
  2. import { ValidationContext } from '../../ValidationContext';
  3. /**
  4. * Prohibit introspection queries
  5. *
  6. * A GraphQL document is only valid if all fields selected are not fields that
  7. * return an introspection type.
  8. *
  9. * Note: This rule is optional and is not part of the Validation section of the
  10. * GraphQL Specification. This rule effectively disables introspection, which
  11. * does not reflect best practices and should only be done if absolutely necessary.
  12. */
  13. export function NoSchemaIntrospectionCustomRule(
  14. context: ValidationContext,
  15. ): ASTVisitor;