Learn how to add robust authentication to your GraphQL server using Prisma in this comprehensive tutorial. We’ll start by creating data relations between User and Link models, running Prisma migrations, and modifying your GraphQL schema. Follow along as we refactor resolvers, implement login and signup functionality, and add JWT verification to your GraphQL context. Finally, we’ll test our setup using Playground and Prisma Studio, and resolve user-link relations in GraphQL queries. Enhance your GraphQL server security with our step-by-step guide.
⭐️ Course Contents ⭐️
⌨️ (00:00) Intro - Add Authentication to GraphQL Server
⌨️ (00:05) Prisma Schema - Create data relations between User & Link Model
⌨️ (01:00) Run prisma migrations (Apply data schema changes)
⌨️ (01:14) Modify Schema.graphql
⌨️ (02:12) Refactor graphql resolvers
⌨️ (03:05) Add login & signup resolvers
⌨️ (04:05) GraphQL Context - Add JWT verify functionality
⌨️ (05:37) Test GraphQL Authentication (Playground & Prisma Studio)
⌨️ (06:47) Resolving relations between User & Link in GraphQL Query
⌨️ (08:08) More practice - use `userId` from context in other resolvers
⌨️ (08:39) Outro
Code: https://github.com/EricTechPro/react-apollo-demo/tree/a0f38c0350e841c890207635817672e6ad23cbc3/server
Comments on “GraphQL Authentication with Node.js, Apollo Server, Prisma, and SQLite”