Merge generated types with existing ones
Closed this issue · 3 comments
Love this tool so far, so thanks for your work here! I was wondering about the possibility of merging in the generated types with existing custom ones that may be unrelated to prisma2
.
I see that the current behavior allows me to define additional files in src/types
as long as the names don't collide and they won't be overwritten. However, running cnt
does overwrite the index.ts
file, which forces me to re-export the custom files each time.
Would it be possible to allow for custom types alongside the generated ones in the files, or at least add all files in the types
directory back to index.ts
once generation has finished?
Hey @zingerj, what i do in my project i create this files in src/types/models folder and Queries in src/types/queries Mutations src/types/mutations and any custom types i create it into the file i use it
Example i need to create custom input for query i will create input type in this query file
I hope this help you because looking to old file not an option in my tool
Thanks
Ah okay, makes sense. I'm still a little unclear though. Could you provide a quick example to help me understand?