Skip to content

Commit 4dc81fb

Browse files
authored
Add deprecation notices with explicit removal versions (#1386)
Some methods have been marked as deprecated for a while - add explicit versions for each. As recommended in #1383, this marks long deprecated methods as to be removed in v15, and newly deprecated options (legacy sdl) to be removed in v16
1 parent f726196 commit 4dc81fb

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export {
316316
// Produce the GraphQL query recommended for a full schema introspection.
317317
// Accepts optional IntrospectionOptions.
318318
getIntrospectionQuery,
319-
// Deprecated: use getIntrospectionQuery
319+
// @deprecated: use getIntrospectionQuery - will be removed in v15
320320
introspectionQuery,
321321
// Gets the target Operation from a Document
322322
getOperationAST,
@@ -357,9 +357,9 @@ export {
357357
TypeInfo,
358358
// Coerces a JavaScript value to a GraphQL type, or produces errors.
359359
coerceValue,
360-
// @deprecated use coerceValue
360+
// @deprecated use coerceValue - will be removed in v15
361361
isValidJSValue,
362-
// Determine if AST values adhere to a GraphQL type.
362+
// @deprecated use validation - will be removed in v15
363363
isValidLiteralValue,
364364
// Concatenates multiple AST together.
365365
concatAST,

src/language/parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export type ParseOptions = {
8484
* specification.
8585
*
8686
* This option is provided to ease adoption of the final SDL specification
87-
* and will be removed in a future major release.
87+
* and will be removed in v16.
8888
*/
8989
allowLegacySDLEmptyFields?: boolean,
9090

@@ -94,7 +94,7 @@ export type ParseOptions = {
9494
* current specification.
9595
*
9696
* This option is provided to ease adoption of the final SDL specification
97-
* and will be removed in a future major release.
97+
* and will be removed in v16.
9898
*/
9999
allowLegacySDLImplementsInterfaces?: boolean,
100100

src/utilities/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// The GraphQL query recommended for a full schema introspection.
1111
export {
1212
getIntrospectionQuery,
13-
// Deprecated, use getIntrospectionQuery()
13+
// @deprecated, use getIntrospectionQuery() - will be removed in v15
1414
introspectionQuery,
1515
} from './introspectionQuery';
1616
export type {
@@ -86,10 +86,10 @@ export { TypeInfo } from './TypeInfo';
8686
// Coerces a JavaScript value to a GraphQL type, or produces errors.
8787
export { coerceValue } from './coerceValue';
8888

89-
// @deprecated use coerceValue
89+
// @deprecated use coerceValue - will be removed in v15
9090
export { isValidJSValue } from './isValidJSValue';
9191

92-
// Determine if AST values adhere to a GraphQL type.
92+
// @deprecated use validation - will be removed in v15
9393
export { isValidLiteralValue } from './isValidLiteralValue';
9494

9595
// Concatenates multiple AST together.

src/utilities/introspectionQuery.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
112112
`;
113113
}
114114

115+
/**
116+
* Deprecated, call getIntrospectionQuery directly.
117+
*
118+
* This function will be removed in v15
119+
*/
115120
export const introspectionQuery = getIntrospectionQuery();
116121

117122
export type IntrospectionQuery = {|

src/utilities/isValidJSValue.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import type { GraphQLInputType } from '../type/definition';
1212

1313
/**
1414
* Deprecated. Use coerceValue() directly for richer information.
15+
*
16+
* This function will be removed in v15
1517
*/
1618
export function isValidJSValue(
1719
value: mixed,

src/utilities/isValidLiteralValue.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import ValidationContext from '../validation/ValidationContext';
2121
* Utility which determines if a value literal node is valid for an input type.
2222
*
2323
* Deprecated. Rely on validation for documents containing literal values.
24+
*
25+
* This function will be removed in v15
2426
*/
2527
export function isValidLiteralValue(
2628
type: GraphQLInputType,

0 commit comments

Comments
 (0)