Is it possible to combine prisma-client with graphql-yoga?

prisma

#1

How to use graphql-yoga and prisma client together? Or there is nothing to worry about and we can simply use them together?

When we do in mutations and queries with graphql-yoga- its like

await ctx.db.mutation.createUser({
    data: {
      name: 'name',
      email: 'email'
    },
  },
  info,
)

Can I still use graphql-yoga but, write this creation with prisma-client, because it’s simpler ?


#2

Yes it is, example here: https://github.com/prisma/prisma-examples/tree/master/node-graphql


#3

https://github.com/prisma/prisma-examples/tree/master/node-graphql gives a 404 . Anyone know the newer location of the example (if any)?


#5

This is the new location: https://github.com/prisma/prisma-examples/tree/master/node/graphql

The readme of the examples repository structures all the examples nicely now: https://github.com/prisma/prisma-examples