This article will teach you how to build a GraphQL API with Next.js to implement the basic CRUD operations using apollo-server-micro, TypeGraphQL, MongoDB, Redis, Mongoose, and Typegoose.
- What is TypeGraphQL?
- Initialize a Typescript Next.js Project
- Setup MongoDB and Redis Databases
- Setting up Environment Variables
- Connecting to the Redis and MongoDB Databases
- Connect to the MongoDB Database
- Connect to the Redis Database
- Setup the GraphQL Apollo Server in Next.js
- Creating TypeGraphQL and Typegoose Schemas
- Creating the Typegoose Schema
- Creating the TypeGraphQL Schemas
- Create a Global Error Handler
- Creating the CRUD Services
- GraphQL Create Post Service
- GraphQL Get a Single Post Service
- GraphQL Update Post Service
- GraphQL Get all Posts Service
- GraphQL Delete Post Service
- Creating the CRUD TypeGraphQL Resolvers
- Update the Apollo GraphQL Server
- Testing the GraphQL CRUD API in Postman
Read the entire article here: https://codevoweb.com/graphql-crud-api-nextjs-mongodb-typegraphql
Articles in this series::