Hi, I have an idea/suggestion. I find it a little ...
# prisma-whats-new
m
Hi, I have an idea/suggestion. I find it a little bit tedious to always copy/paste my graphql datamodels from the prisma backend to the server graphql type definition file, 90% of my models are reused anyway. Wouldnt it be possible to simply add an anotation like "expose" and "private" to the prisma type definitions and their parameters and include the types in the code generation process? with default to "private", this would not change the current behavior and could be handy to quickly export the types you want to expose from prisma in a DRY manner without having to copy paste the common types all the time.
🦜 2
👍 2
❤️ 3
m
@nikolasburk @nilan I second this. I feel like I would like to expose 80% of prisma calls on the public api.
m
additionally, it might be nice to also make overriding these in the server portion of the app a more conscious process with an "extends" or "overrides" annotation on altering type definitions.
n
also see https://github.com/graphcool/graphql-import/issues/42 @Moritz would love to discuss this in a new issue there 🙂
m
m
@Moritz do you use resolver-forwarding for this?
m
@max not sure what you mean, resolver forwarding still requires the type definitions on the server side. it is possible to import these from the generated code, but that does not give an option to exclude certain parameters or extend/override some.
m
oh okay got it
thanks Moritz. I hadn't taken into account the exclusion of parameters and extend/override