-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[typescript-operations] Cut down avoidOptionals to only support object, inputValue and defaultValue (+ minor drive-by fixes)
#10579
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
Conversation
🦋 Changeset detectedLatest commit: cddb06a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| "ignore": [ | ||
| "website", | ||
| "example-*", | ||
| "dev-test*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-codegen/cli |
6.1.2-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/introspection |
5.0.1-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/visitor-plugin-common |
7.0.0-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-document-nodes |
5.0.8-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/gql-tag-operations |
5.1.3-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-operations |
6.0.0-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-resolvers |
6.0.0-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typed-document-node |
6.1.6-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript |
6.0.0-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/client-preset |
6.0.0-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/graphql-modules-preset |
5.1.3-alpha-20260121105018-cddb06acaff1e8871880dbab01eea71c1639578b |
npm ↗︎ unpkg ↗︎ |
| * | ||
| * Note: In most configurations, this plugin requires you to use `typescript as well, because it depends on its base types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this makes me feel we are so close now!
| // FIXME: this is the legacy avoidOptionals which was used to make Result fields non-optional. This use case is no longer valid. | ||
| // It's also being used for Variables so people could already be using it. | ||
| // Maybe it's better to deprecate and remove, to see what users think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it for now to keep the scope of this project manageable
avoidOptionals to only support object, inputValue and defaultValueavoidOptionals to only support object, inputValue and defaultValue (+ minor drive-by fixes)

Description
This PR updates
avoidOptionalsconfig option intypescript-operationsto only supportobject,inputValueanddefaultValue.Strictly speaking, this is a type change because the rest of the options did not have any effect on the plugin. However, since it's an interface change, it's a breaking change and it's mentioned so in the changeset
I've also did a couple of drove-by fixes:
dev-test-apollo-toolingRelated #10496
Type of change