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

graphql codegen init missing plugin #1878

Open
Diluka opened this issue Dec 29, 2021 · 0 comments
Open

graphql codegen init missing plugin #1878

Diluka opened this issue Dec 29, 2021 · 0 comments

Comments

@Diluka
Copy link

Diluka commented Dec 29, 2021

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');

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;

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

No branches or pull requests

1 participant