Skip to content

Add deprecation notices with explicit removal versions #1386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export {
// Produce the GraphQL query recommended for a full schema introspection.
// Accepts optional IntrospectionOptions.
getIntrospectionQuery,
// Deprecated: use getIntrospectionQuery
// @deprecated: use getIntrospectionQuery - will be removed in v15
introspectionQuery,
// Gets the target Operation from a Document
getOperationAST,
Expand Down Expand Up @@ -357,9 +357,9 @@ export {
TypeInfo,
// Coerces a JavaScript value to a GraphQL type, or produces errors.
coerceValue,
// @deprecated use coerceValue
// @deprecated use coerceValue - will be removed in v15
isValidJSValue,
// Determine if AST values adhere to a GraphQL type.
// @deprecated use validation - will be removed in v15
isValidLiteralValue,
// Concatenates multiple AST together.
concatAST,
Expand Down
4 changes: 2 additions & 2 deletions src/language/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export type ParseOptions = {
* specification.
*
* This option is provided to ease adoption of the final SDL specification
* and will be removed in a future major release.
* and will be removed in v16.
*/
allowLegacySDLEmptyFields?: boolean,

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

Expand Down
6 changes: 3 additions & 3 deletions src/utilities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// The GraphQL query recommended for a full schema introspection.
export {
getIntrospectionQuery,
// Deprecated, use getIntrospectionQuery()
// @deprecated, use getIntrospectionQuery() - will be removed in v15
introspectionQuery,
} from './introspectionQuery';
export type {
Expand Down Expand Up @@ -86,10 +86,10 @@ export { TypeInfo } from './TypeInfo';
// Coerces a JavaScript value to a GraphQL type, or produces errors.
export { coerceValue } from './coerceValue';

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

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

// Concatenates multiple AST together.
Expand Down
5 changes: 5 additions & 0 deletions src/utilities/introspectionQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
`;
}

/**
* Deprecated, call getIntrospectionQuery directly.
*
* This function will be removed in v15
*/
export const introspectionQuery = getIntrospectionQuery();

export type IntrospectionQuery = {|
Expand Down
2 changes: 2 additions & 0 deletions src/utilities/isValidJSValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type { GraphQLInputType } from '../type/definition';

/**
* Deprecated. Use coerceValue() directly for richer information.
*
* This function will be removed in v15
*/
export function isValidJSValue(
value: mixed,
Expand Down
2 changes: 2 additions & 0 deletions src/utilities/isValidLiteralValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import ValidationContext from '../validation/ValidationContext';
* Utility which determines if a value literal node is valid for an input type.
*
* Deprecated. Rely on validation for documents containing literal values.
*
* This function will be removed in v15
*/
export function isValidLiteralValue(
type: GraphQLInputType,
Expand Down