summaryrefslogtreecommitdiff
path: root/includes/external/school/node_modules/graphql/utilities/findDeprecatedUsages.mjs
blob: 7a850046a71596febe5b9c84a5e3754bc0029ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { validate } from "../validation/validate.mjs";
import { NoDeprecatedCustomRule } from "../validation/rules/custom/NoDeprecatedCustomRule.mjs";
/**
 * A validation rule which reports deprecated usages.
 *
 * Returns a list of GraphQLError instances describing each deprecated use.
 *
 * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead:
 *
 * ```
 * import { validate, NoDeprecatedCustomRule } from 'graphql'
 *
 * const errors = validate(schema, document, [NoDeprecatedCustomRule])
 * ```
 */

export function findDeprecatedUsages(schema, ast) {
  return validate(schema, ast, [NoDeprecatedCustomRule]);
}