Anyone auto generating graphql schema from a `sche...
# orm-help
r
Anyone auto generating graphql schema from a
schema.prisma
file? Trying to see if there is any way of having a single source of truth to generate DB schema/graphql schema/ and some types - maybe a pipe dream though 🙂: Edit - I think
typegraphql-prisma
may be what I am looking for
👀 1
b
I understand the pain due to overhead in managing duplicate types, but It’s generally bad practice to tie your database schema to your graphql schema so you’re not exposing fields directly. Could be why not many people are doing it.
r
@Ryan Byrne 👋 You can use TypeGraphQL to auto generate the resolvers for you. There’s also another package made by a community member used with Nexus that does the same.
💯 2
r
Thanks @Ryan !!!
🙌 1
j
I would like to generate just the typeDefs for qpollo or the schema.graphql to avoid defining the contracts manually and just write the needed resolvers as we need them. I'm investigating...