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:
- npx graphql-cli init
- choose 3
- choose 2
- choose react Apollo
- 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');
|
case FrontendType.TSReactApollo: |
|
codegenPlugins.add('typescript'); |
|
codegenPlugins.add('typescript-react-apollo'); |
|
break; |
|
case FrontendType.ApolloAngular: |
|
codegenPlugins.add('typescript'); |
|
codegenPlugins.add('typescript-apollo-angular'); |
|
break; |
|
case FrontendType.StencilApollo: |
|
codegenPlugins.add('typescript'); |
|
codegenPlugins.add('typescript-stencil-apollo'); |
|
break; |
|
case FrontendType.TSUrql: |
|
codegenPlugins.add('typescript'); |
|
codegenPlugins.add('typescript-urql'); |
|
break; |
|
case FrontendType.GraphQLRequest: |
|
codegenPlugins.add('typescript'); |
|
codegenPlugins.add('typescript-graphql-request'); |
|
break; |
Describe the bug
when config to codegen typescript client such as apollo client, the plugin
typescript-operationsis missing. then generated file using types without declaration.To Reproduce
Steps to reproduce the behavior:
Expected behavior
have plugins below
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Windows 10,OS X High Sierra,Ubuntu 16.04]graphql-cli: [e.g.2.16.5]Additional context
should have
codegenPlugins.add('typescript-operations');graphql-cli/packages/commands/init/src/features/codegen.ts
Lines 66 to 85 in fad5278