apollographql / apollographql/apollo-tooling
Both graphql@14 and graphql@15 are installed when installing apollo. (e.g., apollo client:codegen command doesn't work properly when you run it as a script.)
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
project environment: create-react-app with typescript template
dev environment: windows10, wsl2, node(14.16.0 ver), npm(7.5.6 ver)

1) When I run [apollo client:codegen src/generated_api_types --target=typescript --outputFlat], it works fine. All the interfaces are generated perfectly.
2) But if I run the same command as [npm run apollo:codegen], it doesn't work.
3) The same problem arises if remove the --outputFlat option, so I guess that's not the cause.
Also, I found another person with the same issue online. Can someone help me how to fix it?
Contributor guide
Research direction
Reproduce the difference between the direct Apollo codegen command and the npm script using the reported Create React App, TypeScript, Node, npm, and WSL2 setup. Inspect Apollo CLI dependency resolution for the installed graphql@14 and graphql@15 versions. Done means the npm script generates the same interfaces successfully as the direct command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100