graphql-relay-js
graphql-relay-js copied to clipboard
improve mutationWithClientId types with generics
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: noghartt / name: Guilherme (7dac92b06f719b5ba3745385a647a3a662fc5c80)
@IvanGoncharov can we land this?
I would like to type inputFields and outputFields too, but I couldn't find a better way than put something like:
inputFields: Record<keyof TInput, (() => GraphQLInputFieldConfig) | GraphQLInputFieldConfig>;
outputFields: Record<keyof TOutput, (() => GraphQLFieldConfig<TOutput, TContext>) | GraphQLFieldConfig<TOutput, TContext>>;
In this case, we override ThunkObjMap util type. Would have a better way to do it?
@graphql/tsc I don't think this project explicitly has a maintainer right now, and other than @andimarek merging a link fix recently hasn't had any updates since 2021. It looks like the overhead of maintaining it should be relatively minor, but in the mean time I move that we merge and ship this PR. I have no experience with this library, but the changes are small and they appear to be non-breaking since all the generics added have defaults. Does anyone have any concerns about this? I'm going to leave it a month (since it's already been over a year) for feedback, and if there's no concerns raised I'll go ahead and merge it after then.