@@ -3,7 +3,6 @@ import type { Maybe } from '../jsutils/Maybe.js';
3
3
import type {
4
4
ASTNode ,
5
5
DocumentNode ,
6
- FieldNode ,
7
6
FragmentDefinitionNode ,
8
7
VariableDefinitionNode ,
9
8
} from '../language/ast.js' ;
@@ -64,7 +63,6 @@ export class TypeInfo {
64
63
65
64
private _fragmentSignature : Maybe < FragmentSignature > ;
66
65
private _fragmentArgument : Maybe < VariableDefinitionNode > ;
67
- private _getFieldDef : GetFieldDefFn ;
68
66
69
67
constructor (
70
68
schema : GraphQLSchema ,
@@ -73,9 +71,6 @@ export class TypeInfo {
73
71
* beginning somewhere other than documents.
74
72
*/
75
73
initialType ?: Maybe < GraphQLType > ,
76
-
77
- /** @deprecated will be removed in 17.0.0 */
78
- getFieldDefFn ?: Maybe < GetFieldDefFn > ,
79
74
fragmentSignatures ?: Maybe <
80
75
( fragmentName : string ) => Maybe < FragmentSignature >
81
76
> ,
@@ -92,7 +87,6 @@ export class TypeInfo {
92
87
this . _fragmentSignaturesByName = fragmentSignatures ?? ( ( ) => null ) ;
93
88
this . _fragmentSignature = null ;
94
89
this . _fragmentArgument = null ;
95
- this . _getFieldDef = getFieldDefFn ?? getFieldDef ;
96
90
if ( initialType ) {
97
91
if ( isInputType ( initialType ) ) {
98
92
this . _inputTypeStack . push ( initialType ) ;
@@ -185,7 +179,7 @@ export class TypeInfo {
185
179
let fieldDef ;
186
180
let fieldType : unknown ;
187
181
if ( parentType ) {
188
- fieldDef = this . _getFieldDef ( schema , parentType , node ) ;
182
+ fieldDef = schema . getField ( parentType , node . name . value ) ;
189
183
if ( fieldDef ) {
190
184
fieldType = fieldDef . type ;
191
185
}
@@ -348,20 +342,6 @@ export class TypeInfo {
348
342
}
349
343
}
350
344
351
- type GetFieldDefFn = (
352
- schema : GraphQLSchema ,
353
- parentType : GraphQLCompositeType ,
354
- fieldNode : FieldNode ,
355
- ) => Maybe < GraphQLField < unknown , unknown > > ;
356
-
357
- function getFieldDef (
358
- schema : GraphQLSchema ,
359
- parentType : GraphQLCompositeType ,
360
- fieldNode : FieldNode ,
361
- ) {
362
- return schema . getField ( parentType , fieldNode . name . value ) ;
363
- }
364
-
365
345
function getFragmentSignatures (
366
346
document : DocumentNode ,
367
347
) : Map < string , FragmentSignature > {
0 commit comments