Open schickling opened 6 years ago
From this discussion, Nikolas mentions that "It is true that the client requires you to implement type resolvers for types that have relations to other types"
Just trying to understand - does this idea solve that use case? I am having to define lots of type resolvers for relations that I did not have to write under prisma-bindings, it's quite a bit of boilerplate code
@schickling Any update on this? When adding new relation fields in my datamodel.prisma
I have to add boilerplate resolvers, and these are adding up quickly
Once we're supporting GraphQL directives (see #83) and a plugin system (see #84), there could be a Prisma plugin that automatically scaffolds the relation resolvers (similar to the
forwardTo
functionality ofgraphql-binding
). Here is an example (syntax still WIP):schema.graphql
Further idea: This combined with the usage of
graphql-import
could lead to a very concise and minimal setup where for most cases it's enough to change something in yourdatamodel.prisma
and theschema.graphql
file + resolvers will be adjusted automatically.