GraphQL: Allow specifying Args on GraphQLFieldResolver (optional)#22789
Conversation
|
@tgriesser Thank you for submitting this PR! 🔔 @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
| ) => boolean | Promise<boolean>; | ||
|
|
||
| export type GraphQLFieldResolver<TSource, TContext> = ( | ||
| export type GraphQLFieldResolver<TSource, TContext, TArgs = { [argName: string]: any }> = ( |
There was a problem hiding this comment.
@tgriesser In graphql-js it described as following
export type GraphQLFieldResolver<TSource, TContext> = (I strongly believe that TS typings should be in sync with official Flow typings.
Please consider contributing your changes to graphql-js first.
There was a problem hiding this comment.
@IvanGoncharov Related PR: graphql/graphql-js#1197
|
@tgriesser One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
|
@IvanGoncharov I think this should be good to go now that |
|
A definition author has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
|
@tgriesser I continue to be unable to include args in a resolver function without a TS error. Do you have an example of a resolver function taking an arg that doesn't throw a TS error using |
npm run lint package-name(ortscif notslint.jsonis present).