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

improve autogenerated jsdocs #8633

Conversation

jantimon
Copy link
Contributor

@jantimon jantimon commented Nov 22, 2022

Related #8632

Type of change

Please delete options that are not relevant.

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

It adds some jsdoc comments to support devs when using the client-preset:

image

In case the generated types are out of sync it provides a hint to regenerate them:

image

It explains why the babel-plugin should be used for production:

image

How Has This Been Tested?

Unfortunately I couldn't update the snapshots on my machine.
Jest showed the following error:

Jest: Couldn't locate all inline snapshots.

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 22, 2022

🦋 Changeset detected

Latest commit: 1e5d0fb

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

This PR includes changesets to release 2 packages
Name Type
@graphql-codegen/gql-tag-operations Patch
@graphql-codegen/client-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

@charlypoly
Copy link
Contributor

Hi @jantimon,

That's a great idea, thank you!

Could you run the test suite locally with the following cli flags to update the snapshots?

yarn test --updateSnashot

Also, you will need to run the E2E tests and commit the result:

yarn generate:examples

Note: both commands must be run at the project root

@charlypoly charlypoly self-assigned this Nov 23, 2022
@jantimon
Copy link
Contributor Author

jantimon commented Nov 23, 2022

Unfortunately yarn test --updateSnashot does not work as soon as there is any inline snapshots mismatch 🤷‍♂️

I managed to fix all tests manually :)

Pipeline is now green

@charlypoly charlypoly merged commit 00ddc93 into dotansimha:master Nov 23, 2022
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.

None yet

2 participants