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

fix: do not import the unused DocumentNode for typed-document-node #4462

Merged
merged 1 commit into from Aug 2, 2020

Conversation

mjbcopland
Copy link
Contributor

The new(ish?) typed-document-node plugin includes an unused import of the default DocumentNode from ClientSideBaseVisitor. One issue with this is it triggers ESLint's no-unused-vars rule.

This PR moves the custom DocumentNode import to the base class with added customisability similar to the gql import (e.g. it should now be possible to use graphql-typed should you wish) and removes the unused import.

@dotansimha
Copy link
Owner

This is awesome! Thank you @mjbcopland !
Great idea to alias the import and use as for importing it with the same name. It seems like this will solve these 2 issues:

@theguild-bot
Copy link
Collaborator

The latest changes of this PR are available as alpha in npm: 1.17.7-alpha-a0bcc046.0

Quickly update your package.json by running:

npx match-version @graphql-codegen 1.17.7-alpha-a0bcc046.0

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

3 participants