Hey! Could someone point me in the direction of so...
# orm-help
t
Hey! Could someone point me in the direction of some docs on how to use the prisma client on a graphql server? Most of the things I found were about generating it and calling it from a script. Is it this article (https://www.prisma.io/docs/1.22/get-started/03-build-graphql-servers-with-prisma-JAVASCRIPT-e001/) and then I need to manually write all of the resolvers?
n
Is it this article (https://www.prisma.io/docs/1.22/get-started/03-build-graphql-servers-with-prisma-JAVASCRIPT-e001/) and then I need to manually write all of the resolvers?
Yep, that's the exactly how you do it 🙂 You first define an operation in your GraphQL schema (schema.graphql) and then add the corresponding resolver function which access the database through the generated Prisma client API.
We're currently working on more tutorials showing how to use the Prisma client for building GraphQL servers.
t
Gotcha, but the resolvers aren't autogenerated, right?
n
Nope. But if you're using TypeScript you can use
graphqlgen
to generate resolver signatures and typings: https://www.prisma.io/blog/graphqlgen-fj3s0ssc1jsx
t
Awesome, thanks