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

Added allowParentTypeOverride to typescript-resolvers plugin #4329

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

dotansimha
Copy link
Owner

The purpose of this new configuration flag (allowParentTypeOverride) is to allow less strict resolvers signature. Setting this to true will change the generated code to use the generic ParentType = MyType instead of ParentType extends MyType = MyType. Changing this will allow developers to have a bridge type that overrides the value they use for parent value (type MyModifiedResolvers = TypeResolvers<ContextType, { customValue: string }>.

@theguild-bot
Copy link
Collaborator

theguild-bot commented Jul 6, 2020

The latest changes of this PR are available as alpha in npm: 1.16.3-alpha-535fa187.0

Quickly update your package.json by running:

npx match-version @graphql-codegen 1.16.3-alpha-535fa187.0

@dotansimha dotansimha merged commit 535fa18 into master Jul 6, 2020
@dotansimha dotansimha deleted the avoid-parent-type-extends branch July 6, 2020 12:40
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