@@ -9,7 +9,6 @@ import type { DirectiveNode } from '../../language/ast';
9
9
import { parse } from '../../language/parser' ;
10
10
11
11
import { buildSchema } from '../../utilities/buildASTSchema' ;
12
- import { TypeInfo } from '../../utilities/TypeInfo' ;
13
12
14
13
import { validate } from '../validate' ;
15
14
import type { ValidationContext } from '../ValidationContext' ;
@@ -58,35 +57,6 @@ describe('Validate: Supports full validation', () => {
58
57
] ) ;
59
58
} ) ;
60
59
61
- it ( 'Deprecated: validates using a custom TypeInfo' , ( ) => {
62
- // This TypeInfo will never return a valid field.
63
- const typeInfo = new TypeInfo ( testSchema , null , ( ) => null ) ;
64
-
65
- const doc = parse ( `
66
- query {
67
- human {
68
- pets {
69
- ... on Cat {
70
- meowsVolume
71
- }
72
- ... on Dog {
73
- barkVolume
74
- }
75
- }
76
- }
77
- }
78
- ` ) ;
79
-
80
- const errors = validate ( testSchema , doc , undefined , undefined , typeInfo ) ;
81
- const errorMessages = errors . map ( ( error ) => error . message ) ;
82
-
83
- expect ( errorMessages ) . to . deep . equal ( [
84
- 'Cannot query field "human" on type "QueryRoot". Did you mean "human"?' ,
85
- 'Cannot query field "meowsVolume" on type "Cat". Did you mean "meowsVolume"?' ,
86
- 'Cannot query field "barkVolume" on type "Dog". Did you mean "barkVolume"?' ,
87
- ] ) ;
88
- } ) ;
89
-
90
60
it ( 'validates using a custom rule' , ( ) => {
91
61
const schema = buildSchema ( `
92
62
directive @custom(arg: String) on FIELD
0 commit comments