This is a template for a GraphQL backend, using Prisma and GraphQL-Yoga.
This setup is based on the original recording of Wes Bos' Advanced React and GraphQL course.
Run npm i --s
Run prisma init
--From here you can set up prisma the way you see fit, however, I would recommend the dev server, and to not generate. Note, you will have to sign up for an account if you have not already. --
Run prisma deploy
Add the following to the bottom of your prisma.yml file
hooks: post-deploy: - graphql get-schema -p prisma
In the variables.env file, change the variables to create your own secret passwords.
Copy the endpoint variable from your prisma.yml file, and paste that into your PRISMA_ENDPOINT environmental variable.
Back in your prisma.yml file, change the endpoint variable to point towards your PRISMA_ENDPOINT environmental variable. endpoint: ${env:PRISMA_ENDPOINT}
npm run dev