@@ -896,21 +896,23 @@ export interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
896896 * });
897897 * ```
898898 */
899- export class GraphQLObjectType < TSource = any , TContext = any >
899+ export class GraphQLObjectType < TSource = any , TContext = any , TAbstract = any >
900900 implements GraphQLSchemaElement
901901{
902902 readonly __kind = objectSymbol ;
903903 name : string ;
904904 description : Maybe < string > ;
905- isTypeOf : Maybe < GraphQLIsTypeOfFn < TSource , TContext > > ;
905+ isTypeOf : Maybe < GraphQLIsTypeOfFn < TAbstract , TContext > > ;
906906 extensions : Readonly < GraphQLObjectTypeExtensions < TSource , TContext > > ;
907907 astNode : Maybe < ObjectTypeDefinitionNode > ;
908908 extensionASTNodes : ReadonlyArray < ObjectTypeExtensionNode > ;
909909
910910 private _fields : ThunkObjMap < GraphQLField < TSource , TContext > > ;
911911 private _interfaces : ThunkReadonlyArray < GraphQLInterfaceType > ;
912912
913- constructor ( config : Readonly < GraphQLObjectTypeConfig < TSource , TContext > > ) {
913+ constructor (
914+ config : Readonly < GraphQLObjectTypeConfig < TSource , TContext , TAbstract > > ,
915+ ) {
914916 this . __kind = objectSymbol ;
915917 this . name = assertName ( config . name ) ;
916918 this . description = config . description ;
@@ -944,7 +946,7 @@ export class GraphQLObjectType<TSource = any, TContext = any>
944946 return this . _interfaces ;
945947 }
946948
947- toConfig ( ) : GraphQLObjectTypeNormalizedConfig < TSource , TContext > {
949+ toConfig ( ) : GraphQLObjectTypeNormalizedConfig < TSource , TContext , TAbstract > {
948950 return {
949951 name : this . name ,
950952 description : this . description ,
@@ -987,19 +989,26 @@ function defineFieldMap<TSource, TContext>(
987989 ) ;
988990}
989991
990- export interface GraphQLObjectTypeConfig < TSource , TContext > {
992+ export interface GraphQLObjectTypeConfig <
993+ TSource ,
994+ TContext ,
995+ TAbstract = unknown ,
996+ > {
991997 name : string ;
992998 description ?: Maybe < string > ;
993999 interfaces ?: ThunkReadonlyArray < GraphQLInterfaceType > | undefined ;
9941000 fields : ThunkObjMap < GraphQLFieldConfig < TSource , TContext > > ;
995- isTypeOf ?: Maybe < GraphQLIsTypeOfFn < TSource , TContext > > ;
1001+ isTypeOf ?: Maybe < GraphQLIsTypeOfFn < TAbstract , TContext > > ;
9961002 extensions ?: Maybe < Readonly < GraphQLObjectTypeExtensions < TSource , TContext > > > ;
9971003 astNode ?: Maybe < ObjectTypeDefinitionNode > ;
9981004 extensionASTNodes ?: Maybe < ReadonlyArray < ObjectTypeExtensionNode > > ;
9991005}
10001006
1001- export interface GraphQLObjectTypeNormalizedConfig < TSource , TContext >
1002- extends GraphQLObjectTypeConfig < TSource , TContext > {
1007+ export interface GraphQLObjectTypeNormalizedConfig <
1008+ TSource ,
1009+ TContext ,
1010+ TAbstract = unknown ,
1011+ > extends GraphQLObjectTypeConfig < TSource , TContext , TAbstract > {
10031012 interfaces : ReadonlyArray < GraphQLInterfaceType > ;
10041013 fields : GraphQLFieldNormalizedConfigMap < TSource , TContext > ;
10051014 extensions : Readonly < GraphQLObjectTypeExtensions < TSource , TContext > > ;
@@ -1013,8 +1022,8 @@ export type GraphQLTypeResolver<TSource, TContext> = (
10131022 abstractType : GraphQLAbstractType ,
10141023) => PromiseOrValue < string | undefined > ;
10151024
1016- export type GraphQLIsTypeOfFn < TSource , TContext > = (
1017- source : TSource ,
1025+ export type GraphQLIsTypeOfFn < TAbstract , TContext > = (
1026+ value : TAbstract ,
10181027 context : TContext ,
10191028 info : GraphQLResolveInfo ,
10201029) => PromiseOrValue < boolean > ;
0 commit comments