Closed benediktms closed 11 months ago
@benediktms thanks for reaching out. This idea has been brought up some time ago but there is corrently no way to implement omiting a model without opening the gates to hell 😈
The generator relies on the prisma dmmf
for generating all input and output types where all the information about the model realtions is stored.
It would be a living hell to filter out all types that a user wants to omit and still have a functioning generator. Also because of the way prisma allows to query relations it is not really possible to omit a model and still gurantee that the generated schemas work properly.
It would be useful to skip some models. For example utility models that are not directly used (e.g. log records or the models for Next Auth). Especially when using the generated input types this creates a lot of 'junk'. It would be nice to have an option to select/omit which models should be included/excluded in the generation.