@@ -714,9 +714,13 @@ export type GraphQLIsTypeOfFn<TSource, TContext> = (
714
714
info : GraphQLResolveInfo ,
715
715
) => MaybePromise < boolean > ;
716
716
717
- export type GraphQLFieldResolver < TSource , TContext > = (
717
+ export type GraphQLFieldResolver <
718
+ TSource ,
719
+ TContext ,
720
+ TArgs = { [ argument : string ] : any } ,
721
+ > = (
718
722
source : TSource ,
719
- args : { [ argument : string ] : any } ,
723
+ args : TArgs ,
720
724
context : TContext ,
721
725
info : GraphQLResolveInfo ,
722
726
) => mixed ;
@@ -739,11 +743,15 @@ export type ResponsePath = {|
739
743
+ key : string | number ,
740
744
| } ;
741
745
742
- export type GraphQLFieldConfig < TSource , TContext > = {
746
+ export type GraphQLFieldConfig <
747
+ TSource ,
748
+ TContext ,
749
+ TArgs = { [ argument : string ] : any } ,
750
+ > = {
743
751
type : GraphQLOutputType ,
744
752
args ?: GraphQLFieldConfigArgumentMap ,
745
- resolve ?: GraphQLFieldResolver < TSource , TContext> ,
746
- subscribe ?: GraphQLFieldResolver < TSource , TContext> ,
753
+ resolve ?: GraphQLFieldResolver < TSource , TContext, TArgs > ,
754
+ subscribe ?: GraphQLFieldResolver < TSource , TContext, TArgs > ,
747
755
deprecationReason ?: ?string ,
748
756
description ?: ?string ,
749
757
astNode ?: ?FieldDefinitionNode ,
@@ -762,13 +770,17 @@ export type GraphQLFieldConfigMap<TSource, TContext> = ObjMap<
762
770
GraphQLFieldConfig < TSource , TContext > ,
763
771
> ;
764
772
765
- export type GraphQLField < TSource , TContext > = {
773
+ export type GraphQLField <
774
+ TSource ,
775
+ TContext ,
776
+ TArgs = { [ argument : string ] : any } ,
777
+ > = {
766
778
name : string ,
767
779
description : ?string ,
768
780
type : GraphQLOutputType ,
769
781
args : Array < GraphQLArgument > ,
770
- resolve ? : GraphQLFieldResolver < TSource , TContext> ,
771
- subscribe ?: GraphQLFieldResolver < TSource , TContext> ,
782
+ resolve ? : GraphQLFieldResolver < TSource , TContext, TArgs > ,
783
+ subscribe ?: GraphQLFieldResolver < TSource , TContext, TArgs > ,
772
784
isDeprecated ?: boolean ,
773
785
deprecationReason ?: ?string ,
774
786
astNode ?: ?FieldDefinitionNode ,
0 commit comments