graphql-cli icon indicating copy to clipboard operation
graphql-cli copied to clipboard

graphql codegen init missing plugin

Open Diluka opened this issue 3 years ago • 0 comments

Describe the bug when config to codegen typescript client such as apollo client, the plugin typescript-operations is missing. then generated file using types without declaration.

To Reproduce Steps to reproduce the behavior:

  1. npx graphql-cli init
  2. choose 3
  3. choose 2
  4. choose react Apollo
  5. other steps using defaults

Expected behavior have plugins below

plugins:
  - typescript
  - typescript-operations
  - typescript-react-apollo

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: [e.g. Windows 10, OS X High Sierra, Ubuntu 16.04]
  • graphql-cli: [e.g. 2.16.5]
  • other packages if applicable

Additional context should have codegenPlugins.add('typescript-operations'); https://github.com/Urigo/graphql-cli/blob/fad5278ae5c13a67df55f20f0bc26b4d96757543/packages/commands/init/src/features/codegen.ts#L66-L85

Diluka avatar Dec 29 '21 05:12 Diluka