blob: e27b03e08ceb39a0e19d2e1fd69652938338df86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.findDeprecatedUsages = findDeprecatedUsages;
var _validate = require("../validation/validate.js");
var _NoDeprecatedCustomRule = require("../validation/rules/custom/NoDeprecatedCustomRule.js");
/**
* 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])
* ```
*/
function findDeprecatedUsages(schema, ast) {
return (0, _validate.validate)(schema, ast, [_NoDeprecatedCustomRule.NoDeprecatedCustomRule]);
}
|