diff --git a/.nycrc.yml b/.nycrc.yml index 42cc7a45c8..91de70cb7b 100644 --- a/.nycrc.yml +++ b/.nycrc.yml @@ -5,7 +5,6 @@ exclude: - 'src/polyfills' - '**/*-fuzz.js' - '**/*.d.ts' - - 'src/utilities/findDeprecatedUsages.js' clean: true temp-directory: 'coverage' report-dir: 'coverage' diff --git a/src/index.d.ts b/src/index.d.ts index 0776078b8b..89e2cc33d1 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -431,8 +431,6 @@ export { DangerousChangeType, findBreakingChanges, findDangerousChanges, - // @deprecated: Report all deprecated usage within a GraphQL document. - findDeprecatedUsages, } from './utilities/index'; export { diff --git a/src/index.js b/src/index.js index 104ab88658..e19e6084d5 100644 --- a/src/index.js +++ b/src/index.js @@ -420,8 +420,6 @@ export { DangerousChangeType, findBreakingChanges, findDangerousChanges, - // @deprecated: Report all deprecated usage within a GraphQL document. - findDeprecatedUsages, } from './utilities/index'; export type { diff --git a/src/utilities/findDeprecatedUsages.d.ts b/src/utilities/findDeprecatedUsages.d.ts deleted file mode 100644 index bbdf94391e..0000000000 --- a/src/utilities/findDeprecatedUsages.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { GraphQLError } from '../error/GraphQLError'; -import { DocumentNode } from '../language/ast'; -import { GraphQLSchema } from '../type/schema'; - -/** - * 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: GraphQLSchema, - ast: DocumentNode, -): ReadonlyArray; diff --git a/src/utilities/findDeprecatedUsages.js b/src/utilities/findDeprecatedUsages.js deleted file mode 100644 index f193494bab..0000000000 --- a/src/utilities/findDeprecatedUsages.js +++ /dev/null @@ -1,28 +0,0 @@ -import type { GraphQLError } from '../error/GraphQLError'; - -import type { DocumentNode } from '../language/ast'; - -import type { GraphQLSchema } from '../type/schema'; - -import { validate } from '../validation/validate'; -import { NoDeprecatedCustomRule } from '../validation/rules/custom/NoDeprecatedCustomRule'; - -/** - * 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: GraphQLSchema, - ast: DocumentNode, -): $ReadOnlyArray { - return validate(schema, ast, [NoDeprecatedCustomRule]); -} diff --git a/src/utilities/index.d.ts b/src/utilities/index.d.ts index a8019f99d8..5f2caa84fb 100644 --- a/src/utilities/index.d.ts +++ b/src/utilities/index.d.ts @@ -114,6 +114,3 @@ export { // Wrapper type that contains DocumentNode and types that can be deduced from it. export { TypedQueryDocumentNode } from './typedQueryDocumentNode'; - -// @deprecated: Report all deprecated usage within a GraphQL document. -export { findDeprecatedUsages } from './findDeprecatedUsages'; diff --git a/src/utilities/index.js b/src/utilities/index.js index 27f849014e..15b84fa0df 100644 --- a/src/utilities/index.js +++ b/src/utilities/index.js @@ -108,6 +108,3 @@ export { findDangerousChanges, } from './findBreakingChanges'; export type { BreakingChange, DangerousChange } from './findBreakingChanges'; - -// @deprecated: Report all deprecated usage within a GraphQL document. -export { findDeprecatedUsages } from './findDeprecatedUsages';