File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -109,15 +109,15 @@ export function fromGlobalId(globalId: string): ResolvedGlobalId {
109109 */
110110export function globalIdField (
111111 typeName ?: ?string ,
112- idFetcher ?: ( object : any ) = > string
112+ idFetcher ?: ( object : any , info : GraphQLResolveInfo ) = > string
113113) : GraphQLFieldConfig {
114114 return {
115115 name : 'id ',
116116 description : 'The ID of an object ',
117117 type : new GraphQLNonNull ( GraphQLID ) ,
118- resolve : ( obj , args , { parentType } ) = > toGlobalId (
119- typeName != null ? typeName : parentType . name ,
120- idFetcher ? idFetcher ( obj ) : obj . id
118+ resolve : ( obj , args , info ) = > toGlobalId (
119+ typeName != null ? typeName : info . parentType . name ,
120+ idFetcher ? idFetcher ( obj , info ) : obj . id
121121 )
122122 } ;
123123}
You can’t perform that action at this time.
0 commit comments