Hey guys, I have a question for you. My team and I...
# orm-help
c
Hey guys, I have a question for you. My team and I want to create a "back-end as a service" service for our internal applications, then stitch all schemas in a gateway that would authenticate users using a jwt (auth0 in this case). Schemas would have directives to describe permissions (something like
@query('HR Management') @mutation('Management')
). A developer would then just need to produce a datamodel for prisma with the right directives. At first we thought about doing a gateway that stitches a list of schemas automatically, but with recent announces of Apollo federation/gateway and the fact that prisma will soon no longer need a prisma server to do its magic we're forced to reassess things. I think we could deploy an apollo federation service for each "backend" we provide, this service uses the datamodel of prisma as its graphql schema. Problem is we need to generate the resolvers, or have the developer write them (would be very easy but quite long sometimes). Or we could do a CLI that generates them using the datamodel and prisma client. What do you guys think ? Have anyone of you been in this situation before where you want to generate resolvers automatically based on a datamodel ?
a
Prisma will generate CRUD resolvers of your datamodel. Business logic resolvers will have to be custom built. Is this what you mean? Also I built a micro service backend using schema stitching in our gateway and I still think it's a viable solution to go for imo. The removal of extra Prisma server and docker is optional in Prisma 2 btw.