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

Revert default ID scalar input type to string #9497

Merged
merged 10 commits into from
Jun 13, 2023
Merged

Conversation

eddeee888
Copy link
Collaborator

Description

We changed the ID Scalar input type to string | number from string in the latest major version of typescript. This causes issues for server plugins (e.g. typescript-resolvers) because the scalar type needs to be manually inverted on setup which is confusing.

This PR reverts ID scalar input back to string to ensure typescript plugin works for all client/server plugins that depend on it.

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit test

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

🦋 Changeset detected

Latest commit: 460ece4

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

This PR includes changesets to release 9 packages
Name Type
@graphql-codegen/visitor-plugin-common Patch
@graphql-codegen/typescript-operations Patch
@graphql-codegen/typescript Patch
@graphql-codegen/typescript-resolvers Patch
@graphql-codegen/client-preset Patch
@graphql-codegen/typescript-document-nodes Patch
@graphql-codegen/gql-tag-operations Patch
@graphql-codegen/typed-document-node Patch
@graphql-codegen/graphql-modules-preset 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

@eddeee888 eddeee888 changed the title Revert default id input Revert default ID scalar input type to string Jun 12, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2023

🚀 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/visitor-plugin-common 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 5.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 4.0.1-alpha-20230613103340-460ece4ec npm ↗︎ unpkg ↗︎

@eddeee888 eddeee888 requested a review from n1ru4l June 12, 2023 10:22
@@ -3,7 +3,6 @@
'@graphql-codegen/typescript-operations': patch
'@graphql-codegen/typescript': patch
'@graphql-codegen/typescript-resolvers': patch
'@graphql-codegen/cli': patch
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 don't think the CLI package needs to be bumped in this case because only the test was changed and it didn't have @graphql-codegen/visitor-plugin-common or @graphql-codegen/cli in its dep list

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2023

💻 Website Preview

The latest changes are available as preview in: https://cbf8335d.graphql-code-generator.pages.dev

@n1ru4l n1ru4l merged commit 2276708 into master Jun 13, 2023
@n1ru4l n1ru4l deleted the revert-default-id-input branch June 13, 2023 11:06
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