findDeprecatedUsages.d.ts 640 B

123456789101112131415161718192021
  1. import { GraphQLError } from '../error/GraphQLError';
  2. import { DocumentNode } from '../language/ast';
  3. import { GraphQLSchema } from '../type/schema';
  4. /**
  5. * A validation rule which reports deprecated usages.
  6. *
  7. * Returns a list of GraphQLError instances describing each deprecated use.
  8. *
  9. * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead:
  10. *
  11. * ```
  12. * import { validate, NoDeprecatedCustomRule } from 'graphql'
  13. *
  14. * const errors = validate(schema, document, [NoDeprecatedCustomRule])
  15. * ```
  16. */
  17. export function findDeprecatedUsages(
  18. schema: GraphQLSchema,
  19. ast: DocumentNode,
  20. ): ReadonlyArray<GraphQLError>;