Nestjs Graphql Best Practice screenshot

Nestjs Graphql Best Practice

Author Avatar Theme by Chnirt
Updated: 21 Feb 2021
1339 Stars

NestJS (Express + TypeORM + GraphQL + MongoDB) codebase containing real world examples (CRUD, auth, advanced patterns, etc).

Categories

Overview:

This NestJS GraphQL Best Practice article provides a comprehensive guide to building applications with NestJS and GraphQL, utilizing Express and Typeorm. It includes real-world examples showcasing various functionalities such as CRUD operations, authentication mechanisms, and advanced coding patterns. The article covers topics ranging from project structure to security and performance best practices in Node.js development.

Features:

  • Dynamic import
  • Authenticate
  • Config jwt like OAuth (access-token, refresh-token)
  • OAuth Google
  • OAuth Facebook
  • Dump database
  • Child process
  • Logger

Installation:

  1. Clone the repository
  2. Change directory to the project folder
  3. Create a .env file and add necessary configurations
  4. Install dependencies using npm
  5. Generate graphql.schema.ts
    • Start in development normal or Start with webpack (2 terminal view)

Summary:

The NestJS GraphQL Best Practice article outlines essential practices and guidelines for developing applications with NestJS and GraphQL. It covers a wide range of topics, from project structure and error handling to code style, testing, and overall quality practices in Node.js development. By following these best practices, developers can ensure the efficiency, security, and reliability of their NestJS applications.