graphql-code-generator-community
graphql-code-generator-community copied to clipboard
[typescript-react-apollo] `graphql-tag` peer dependency is missing
Which packages are impacted by your issue?
@graphql-codegen/typescript-react-apollo
Describe the bug
When following the typescript-react-apollo install instructions at:
https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-react-apollo#installation
yarn add --dev @graphql-codegen/typescript-react-apollo
I receive a warning:
warning " > @graphql-codegen/[email protected]" has unmet peer dependency "graphql-tag@^2.0.0".
Looking at the package.json, graphql-tag is indeed defined in peerDependencies:
https://github.com/dotansimha/graphql-code-generator-community/blob/d334e8045f30b7995d22deb69a01237018396214/packages/plugins/typescript/react-apollo/package.json#L39-L42
But graphql-tag is not imported in any of the three src/ directory files:
https://github.com/dotansimha/graphql-code-generator-community/tree/d334e8045f30b7995d22deb69a01237018396214/packages/plugins/typescript/react-apollo/src
graphql-tag is only imported once in the tests/ directory:
https://github.com/dotansimha/graphql-code-generator-community/tree/d334e8045f30b7995d22deb69a01237018396214/packages/plugins/typescript/react-apollo/tests/react-apollo.spec.ts#L2
Should graphql-tag instead be defined in devDependencies? 🤔
Steps to Reproduce the Bug or Issue
- Install the plugin.
yarn add --dev @graphql-codegen/typescript-react-apollo
- See warning message.
warning " > @graphql-codegen/[email protected]" has unmet peer dependency "graphql-tag@^2.0.0".
Expected behavior
- See plugin installed without any warning messages.
And if graphql-tag is indeed required:
- See documentation that
graphql-tagis required to be installed.
Platform
- OS: macOS
- NodeJS: 20.8.1
graphqlversion: 15.8.0@graphql-codegen/cliversion: 3.2.2@graphql-codegen/typescriptversion: 3.0.2@graphql-codegen/typescript-document-nodesversion: 2.3.12@graphql-codegen/typescript-operationsversion: 3.0.2@graphql-codegen/typescript-react-apolloversion: 3.3.7