Generate file for each type for server development #4922
-
Thanks for the great tool! Looking through the documentation I am not sure if its possible to generate a file per type? Given the following schema:
Could we generate 2 files:
We have a large team and generating all the types in one file will cause merge conflicts. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! Currently, we don't support that. This could be done with a custom preset for codegen - you can break your schema to smaller pieces and feed it back to the |
Beta Was this translation helpful? Give feedback.
Hi! Currently, we don't support that. This could be done with a custom preset for codegen - you can break your schema to smaller pieces and feed it back to the
typescript
plugin.Please note that we try to avoid these kind of solutions intentionally, since maintaining multiple files is far more complex, and it might cause issues like circular imports and dependencies.