Skip to content

Conversation

@eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Jan 15, 2026

Description

This PR re-implements inputMaybeValue for typescript-operations use case.
This was implemented for both Input and Variables previously, but temporarily removed from typescript-operations plugin whilst we refactor and decouple the plugins.

Main change: Instead of using InputMaybe wrapper, we now inline it:

  • Previously: InputMaybe<string>
  • Now: string | null | undefined (if type InputMaybe = T | null | undefined)

Related #10496

Note: This may create a foot-gun situation since users could misuse the option. However, typescript-operations is a low-level plugin, and this is not supported by client-preset, so this is ok to keep IMO.

Type of change

  • New feature (non-breaking change which adds functionality)

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

🦋 Changeset detected

Latest commit: adb5b53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/typescript-operations Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/cli 6.1.1-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/introspection 5.0.1-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/visitor-plugin-common 7.0.0-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 5.0.8-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 5.1.3-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 6.0.0-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 6.0.0-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 6.1.6-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 6.0.0-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 6.0.0-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 5.1.3-alpha-20260115134814-adb5b53d959481d6b58ec13970e929f7c509bd63 npm ↗︎ unpkg ↗︎

* ```
*/
maybeValue?: string;
inputMaybeValue?: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was debating whether we need to support inputMaybeValue as it can be misused and cause runtime errors for users.

However, I've decided to keep it:

  • Since typescript-operations is a low-level plugin, we could allow flexibilities for advanced users
  • It's previously supported
  • It's still not supported by client-preset, which is the main thing users should reach for, so the chance of foot-gunning is lower.

@eddeee888 eddeee888 merged commit b55828d into master-next Jan 15, 2026
19 checks passed
@eddeee888 eddeee888 deleted the master-next-fix-nullable-custom-scalar-types branch January 15, 2026 13:55
@eddeee888 eddeee888 changed the title Add inputMaybeValue to allow changing Variables and Input nullable types Re-implement inputMaybeValue to allow changing Variables and Input nullable types Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants