add findDeprecatedUsages.

This commit is contained in:
Firede
2017-03-27 17:16:24 +08:00
parent 352a5756b1
commit 67dba4b5a7
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import { GraphQLSchema } from '../type/schema';
import { DocumentNode } from '../language/ast';
import { GraphQLError } from '../error/GraphQLError';
/**
* A validation rule which reports deprecated usages.
*
* Returns a list of GraphQLError instances describing each deprecated use.
*/
export function findDeprecatedUsages(
schema: GraphQLSchema,
ast: DocumentNode
): Array<GraphQLError>
+3
View File
@@ -73,3 +73,6 @@ export { assertValidName } from './assertValidName';
// Compares two GraphQLSchemas and detects breaking changes.
export { findBreakingChanges } from './findBreakingChanges';
export { BreakingChange } from './findBreakingChanges';
// Report all deprecated usage within a GraphQL document.
export { findDeprecatedUsages } from './findDeprecatedUsages';