Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mutationWithClientId types with generics #389

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

noghartt
Copy link
Contributor

@noghartt noghartt commented Dec 5, 2022

No description provided.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 5, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: noghartt / name: Guilherme (7dac92b)

Copy link
Contributor

@sibelius sibelius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@saihaj
Copy link
Member

saihaj commented Dec 5, 2022

@IvanGoncharov can we land this?

Copy link

@vit0rr vit0rr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one

@noghartt
Copy link
Contributor Author

noghartt commented Dec 5, 2022

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?

@benjie
Copy link
Member

benjie commented Mar 21, 2024

@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.

@benjie benjie changed the title improve mutationWithClientId types with generics Improve mutationWithClientId types with generics Mar 27, 2024
@benjie benjie merged commit c24898b into graphql:main Mar 27, 2024
@noghartt noghartt deleted the feat/types branch March 27, 2024 17:29
@benjie benjie added the PR: bug fix 🐞 requires increase of "patch" version number label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants