@@ -3,7 +3,6 @@ import type { Maybe } from '../jsutils/Maybe.js';
33import type {
44 ASTNode ,
55 DocumentNode ,
6- FieldNode ,
76 FragmentDefinitionNode ,
87 VariableDefinitionNode ,
98} from '../language/ast.js' ;
@@ -64,7 +63,6 @@ export class TypeInfo {
6463
6564 private _fragmentSignature : Maybe < FragmentSignature > ;
6665 private _fragmentArgument : Maybe < VariableDefinitionNode > ;
67- private _getFieldDef : GetFieldDefFn ;
6866
6967 constructor (
7068 schema : GraphQLSchema ,
@@ -73,9 +71,6 @@ export class TypeInfo {
7371 * beginning somewhere other than documents.
7472 */
7573 initialType ?: Maybe < GraphQLType > ,
76-
77- /** @deprecated will be removed in 17.0.0 */
78- getFieldDefFn ?: Maybe < GetFieldDefFn > ,
7974 fragmentSignatures ?: Maybe <
8075 ( fragmentName : string ) => Maybe < FragmentSignature >
8176 > ,
@@ -92,7 +87,6 @@ export class TypeInfo {
9287 this . _fragmentSignaturesByName = fragmentSignatures ?? ( ( ) => null ) ;
9388 this . _fragmentSignature = null ;
9489 this . _fragmentArgument = null ;
95- this . _getFieldDef = getFieldDefFn ?? getFieldDef ;
9690 if ( initialType ) {
9791 if ( isInputType ( initialType ) ) {
9892 this . _inputTypeStack . push ( initialType ) ;
@@ -185,7 +179,7 @@ export class TypeInfo {
185179 let fieldDef ;
186180 let fieldType : unknown ;
187181 if ( parentType ) {
188- fieldDef = this . _getFieldDef ( schema , parentType , node ) ;
182+ fieldDef = schema . getField ( parentType , node . name . value ) ;
189183 if ( fieldDef ) {
190184 fieldType = fieldDef . type ;
191185 }
@@ -348,20 +342,6 @@ export class TypeInfo {
348342 }
349343}
350344
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-
365345function getFragmentSignatures (
366346 document : DocumentNode ,
367347) : Map < string , FragmentSignature > {
0 commit comments