Is your feature request related to a problem? Please describe.
To avoid merges, I'd want to generate the react-apollo components in different files. For example. One component per file.
Describe the solution you'd like
It'll be great to have a config option to generate components in different files.
Describe alternatives you've considered
The output file name could accept a regex string, so the files could have a rule for their names.
Additional context
Could be something like that:
generates:
differentFiles: true
plugins:
- typescript
- typescript-operations
- typescript-react-apollo
overwrite:
- true
Hi @andfs , thank you for reporting it.
It was discussed before here. We are currently only support only one output file, in order to avoid the complexity of maintaining imports between generated files.
We might add the feature in the future ;)
@dotansimha thanks for answering me :) I've made a great jog in this lib.
@andfs We are currently support near-operation-file preset (see docs on our website) - you can use this to generate one file per operation, and generate it near the original operation file.
Thanks @dotansimha
Your lib is awesome and thanks to it I did a great job.
graphql-code-generator was crucial for system development that I'm on
\o/
Most helpful comment
Thanks @dotansimha
Your lib is awesome and thanks to it I did a great job.
graphql-code-generator was crucial for system development that I'm on
\o/