From 2cb6ccad2f2584c78cc0988f0e5d9cb449cdffc2 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sun, 25 Aug 2019 13:23:45 +0300 Subject: [PATCH] Remove deprecated 'isValidJSValue' function --- src/index.js | 2 -- src/utilities/index.js | 3 --- src/utilities/isValidJSValue.js | 19 ------------------- tstypes/index.d.ts | 2 -- tstypes/utilities/index.d.ts | 3 --- tstypes/utilities/isValidJSValue.d.ts | 8 -------- 6 files changed, 37 deletions(-) delete mode 100644 src/utilities/isValidJSValue.js delete mode 100644 tstypes/utilities/isValidJSValue.d.ts diff --git a/src/index.js b/src/index.js index 33fcdd202b..2942fcd5e6 100644 --- a/src/index.js +++ b/src/index.js @@ -387,8 +387,6 @@ export { coerceInputValue, // @deprecated use coerceInputValue - will be removed in v15 coerceValue, - // @deprecated use coerceInputValue - will be removed in v15 - isValidJSValue, // @deprecated use validation - will be removed in v15 isValidLiteralValue, // Concatenates multiple AST together. diff --git a/src/utilities/index.js b/src/utilities/index.js index 5641eea1be..f1cfe7b3f1 100644 --- a/src/utilities/index.js +++ b/src/utilities/index.js @@ -86,9 +86,6 @@ export { coerceInputValue } from './coerceInputValue'; // @deprecated use coerceInputValue - will be removed in v15. export { coerceValue } from './coerceValue'; -// @deprecated use coerceInputValue - will be removed in v15. -export { isValidJSValue } from './isValidJSValue'; - // @deprecated use validation - will be removed in v15 export { isValidLiteralValue } from './isValidLiteralValue'; diff --git a/src/utilities/isValidJSValue.js b/src/utilities/isValidJSValue.js deleted file mode 100644 index af2fe40d6e..0000000000 --- a/src/utilities/isValidJSValue.js +++ /dev/null @@ -1,19 +0,0 @@ -// @flow strict - -/* istanbul ignore file */ -import { type GraphQLInputType } from '../type/definition'; - -import { coerceValue } from './coerceValue'; - -/** - * Deprecated. Use coerceInputValue() directly for richer information. - * - * This function will be removed in v15 - */ -export function isValidJSValue( - value: mixed, - type: GraphQLInputType, -): Array { - const errors = coerceValue(value, type).errors; - return errors ? errors.map(error => error.message) : []; -} diff --git a/tstypes/index.d.ts b/tstypes/index.d.ts index aa1692ee2f..3789fc0f3a 100644 --- a/tstypes/index.d.ts +++ b/tstypes/index.d.ts @@ -387,8 +387,6 @@ export { coerceInputValue, // @deprecated use coerceInputValue - will be removed in v15 coerceValue, - // @deprecated use coerceInputValue - will be removed in v15 - isValidJSValue, // @deprecated use validation - will be removed in v15 isValidLiteralValue, // Concatenates multiple AST together. diff --git a/tstypes/utilities/index.d.ts b/tstypes/utilities/index.d.ts index 7d2d675dde..ae08e0c917 100644 --- a/tstypes/utilities/index.d.ts +++ b/tstypes/utilities/index.d.ts @@ -83,9 +83,6 @@ export { coerceInputValue } from './coerceInputValue'; // Coerces a JavaScript value to a GraphQL type, or produces errors. export { coerceValue } from './coerceValue'; -// @deprecated use coerceValue - will be removed in v15 -export { isValidJSValue } from './isValidJSValue'; - // @deprecated use validation - will be removed in v15 export { isValidLiteralValue } from './isValidLiteralValue'; diff --git a/tstypes/utilities/isValidJSValue.d.ts b/tstypes/utilities/isValidJSValue.d.ts deleted file mode 100644 index 36d24efbac..0000000000 --- a/tstypes/utilities/isValidJSValue.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { GraphQLInputType } from '../type/definition'; - -/** - * Deprecated. Use coerceValue() directly for richer information. - * - * This function will be removed in v15 - */ -export function isValidJSValue(value: any, type: GraphQLInputType): string[];