Skip to content

[typescript-operations] Add warning for internal utility types#10643

Merged
eddeee888 merged 4 commits intomaster-nextfrom
master-next-add-warning-for-utility-types
Mar 12, 2026
Merged

[typescript-operations] Add warning for internal utility types#10643
eddeee888 merged 4 commits intomaster-nextfrom
master-next-add-warning-for-utility-types

Conversation

@eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Mar 12, 2026

Description

In the past, users usually use exported types from generated files. These types include full schema types (that shouldn't be used in operations), or internal utility types (Such as Incremental and Exact )

We already got rid of the full schema object types because they would never be used.
However, internal utility types could be exported to be shared in generated files, so there's no way to stop users from using these types.

This PR adds a warning to deter users from using internal utility types, as these can change any time.

Related

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit test
  • Dev test

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: 4dc71eb

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 Mar 12, 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 7.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/introspection 5.0.2-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/visitor-plugin-common 7.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 5.0.10-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 5.1.5-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 6.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 6.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 6.1.8-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 6.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 6.0.0-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 5.1.5-alpha-20260312134304-4dc71eb28e50c83ef2abd041c13c5bd2cdf85cd4 npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 merged commit f8ced4d into master-next Mar 12, 2026
19 checks passed
@eddeee888 eddeee888 deleted the master-next-add-warning-for-utility-types branch March 12, 2026 13:53
eddeee888 added a commit that referenced this pull request Mar 19, 2026
* Add internal utility type warning

* Update snapshots

* Add changeset

* Improve internal type message
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.

1 participant