Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow customization for extensions type #6969

Merged
merged 3 commits into from
Nov 5, 2021

Conversation

dodomorandi
Copy link
Contributor

@dodomorandi dodomorandi commented Nov 3, 2021

Description

This introduces a new configuration for the graphql-request plugin for
typescript. It allows to use unknown (or a custom type) instead of
any for the extensions parameter without breaking changes.

Related dotansimha/graphql-code-generator-community#156

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

No jest tests has been added for this. The change is trivial, but if you want me to add a test, just say it.

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 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 -- Only if I only run tests related to the plugin, otherwise I have lots tests that don't pass, like in master

This introduces a new configuration for the `graphql-request` plugin for
typescript. It allows to use `unknown` (or a custom type) instead of
`any` for the `extensions` parameter without breaking changes.
@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2021

🦋 Changeset detected

Latest commit: 69a99bb

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-graphql-request Minor

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

@vercel
Copy link

vercel bot commented Nov 3, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/theguild/graphql-code-generator/Lu4eeBupQDbf8nhaXyT56X6kuMyT
✅ Preview: Failed

@n1ru4l
Copy link
Collaborator

n1ru4l commented Nov 4, 2021

@dodomorandi Can you please create a changeset that describes this change? See #6969 (comment)

@dodomorandi
Copy link
Contributor Author

Thanks @n1ru4l for the feedback! Let me know if you want me to squash the commits (now or later).

@n1ru4l
Copy link
Collaborator

n1ru4l commented Nov 4, 2021

@dodomorandi Sorry one more thing, could you add a very simple test for verifying that this option does not break in the future? 😇 No worries about squashing, I will do that during the merge!

@dodomorandi
Copy link
Contributor Author

No problem! I was doubtful just because it will be more complex the test than the actual feature 😁. I am going to add the test and update the checklist.

@n1ru4l
Copy link
Collaborator

n1ru4l commented Nov 4, 2021

@dodomorandi The downside of having lots of options is that you can sometimes break them without noticing 😆 Which unfortunately happened a lot lately.

@n1ru4l
Copy link
Collaborator

n1ru4l commented Nov 5, 2021

@dodomorandi Awesome thank you!

@n1ru4l n1ru4l merged commit 3b87f04 into dotansimha:master Nov 5, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants