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 {
109
109
*/
110
110
export function globalIdField (
111
111
typeName ?: ?string ,
112
- idFetcher ?: ( object : any ) = > string
112
+ idFetcher ?: ( object : any , info : GraphQLResolveInfo ) = > string
113
113
) : GraphQLFieldConfig {
114
114
return {
115
115
name : 'id ',
116
116
description : 'The ID of an object ',
117
117
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
121
121
)
122
122
} ;
123
123
}
You can’t perform that action at this time.
0 commit comments