8000 GitHub - wpcodevo/nextjs-typegraphql-api at nextjs-typegraphql-crud
[go: up one dir, main page]

Skip to content

This article will teach you how to build a full-stack CRUD App with Next.js, React Query, GraphQL Code Generator, React-Hook-Form, Zod, and graphql-request to perform Create/Update/Get/Delete operations.

Notifications You must be signed in to change notification settings

wpcodevo/nextjs-typegraphql-api

 
 

Repository files navigation

GraphQL CRUD API with Next.js, MongoDB, and TypeGraphQL

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.

GraphQL CRUD API with Next.js, MongoDB, and TypeGraphQL

Topics Covered

  • 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::

  1. GraphQL API with Next.js & MongoDB: Access & Refresh Tokens
  2. Next.js, GraphQL-CodeGen, & React Query: JWT Authentication
  3. GraphQL CRUD API with Next.js, MongoDB, and TypeGraphQL
  4. Next.js Full-Stack App with React Query, and GraphQL-CodeGen

Releases

No releases published

Packages

No packages published
0