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

Update scalar input/output related CHANGELOG with new recommended codegen config #9491

Closed
wants to merge 5 commits into from

Conversation

eddeee888
Copy link
Collaborator

@eddeee888 eddeee888 commented Jun 7, 2023

Description

CHANGELOGs with references to scalar input/output changes do not have clear instruction on how to migrate for typescript-resolvers users.

This PR adds recommended codegen config to CHANGELOGs and typescript-resolvers documentation

I'll also update the release to keep things in sync.

Type of change

  • CHANGELOG update for clarification
  • Documentation update

@changeset-bot
Copy link

changeset-bot bot commented Jun 7, 2023

⚠️ No Changeset found

Latest commit: 458e63b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

💻 Website Preview

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

@Urigo Urigo requested a review from n1ru4l June 7, 2023 13:18
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

diff --git a/website/algolia-lockfile.json b/website/algolia-lockfile.json
index 82e796d51..6afd04f3d 100644
--- a/website/algolia-lockfile.json
+++ b/website/algolia-lockfile.json
@@ -2826,7 +2826,7 @@
         "anchor": "defined-shared-mappers-across-configurations"
       }
     ],
-    "content": "d9a253f60bca2d44b316f83a56e966f2",
+    "content": "86a1c5885c53c11576b7b27ca37fb58a",
     "url": "https://www.the-guild.dev/graphql/codegen/plugins/typescript/typescript-resolvers",
     "domain": "https://www.the-guild.dev/graphql/codegen",
     "hierarchy": [

Comment on lines +46 to +54
config: {
scalars: {
// This option is required to match how GraphQL servers handle ID scalar
ID: {
input: 'string',
output: 'string | number'
}
}
}
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've added this section with the new config.

Copy link
Collaborator Author

@eddeee888 eddeee888 Jun 7, 2023

Choose a reason for hiding this comment

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

When this page is rendered, the PluginApiDocs is at the top. Readers have to scroll quite far down to see the usage example.

I wonder if we should switch it, so the Usage example is first, then PluginApiDocs is at the bottom?

Comment on lines -133 to -134
<br/>
If you are willing to provide your own fetcher, you can directly jump to the ["Appendix I: React Query with a custom fetcher setup"](#appendix-i-react-query-with-a-custom-fetcher-setup) and continue the guide once React Query is properly setup.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why prettier didn't catch this in the previous PRs 🤔
Running yarn prettier fixes this though.

@eddeee888 eddeee888 force-pushed the update-changelog-to-clarify-scalars branch from 76a5839 to 458e63b Compare June 7, 2023 22:03
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've also update the GraphQL server guides with recommended scalars config

@eddeee888
Copy link
Collaborator Author

This is no longer needed because we have reverted the default ID input/output to string in #9501

@eddeee888 eddeee888 closed this Jun 19, 2023
@eddeee888 eddeee888 deleted the update-changelog-to-clarify-scalars branch June 19, 2023 11:07
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.

3 participants