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

The webpack plugin is not compatible with the latest version of graphql-code-generator #897

Closed
polco opened this issue Nov 21, 2018 · 4 comments

Comments

@polco
Copy link

polco commented Nov 21, 2018

Is your feature request related to a problem? Please describe.
after updating to the latest version of [email protected], i get this error when compiling with webpack:

Unknown codegen template: "graphql-codegen-typescript-template"

Describe the solution you'd like
the webpack plugin API needs to be updated since the 'template' parameters does not exist anymore.

@polco polco changed the title The webpack plugin is not compatible with the latest version of graphql-code.generator The webpack plugin is not compatible with the latest version of graphql-code-generator Nov 21, 2018
@dotansimha
Copy link
Owner

Hi @polco !
We removed the webpack plugin for now. We tried to implement it and released an initial version of it, but it doesn't really work as we expected.
It's not possible to force Webpack to reload the files when a TypeScript interface changes. So it you change a GraphQL file -> The codegen runs, writes to output file -> The output file updates, but Webpack doesn't get the file update and it does not compile (because an interface change does not trigger TypeScript compilation).

@kamilkisiela do you think we should keep trying to find a solution for this?

@dotansimha
Copy link
Owner

Closing for now. We might try to implement again later in the future.

@polco
Copy link
Author

polco commented Nov 22, 2018

OK, I'll go back to using the cli! I'm still surprised cause the plugin was working just fine for me until now. Is the source code available somewhere? I guess in the github history? Thanks for the lib anyway ;)

@dotansimha
Copy link
Owner

Yeah it's in git history, you can take a look at 0.13 tag.

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

2 participants