NestJS GraphQL TypeORM PostgresQL

screenshot of NestJS GraphQL TypeORM PostgresQL
nestjs

NestJS + GraphQL + TypeORM + PostgresQL Boilerplate

Overview:

This product is a NestJS boilerplate that comes with integration for TypeORM, GraphQL, and PostgresQL. It is open for contributions and allows for easy customization through code improvements and bug fixes. The boilerplate utilizes NestJS as the base framework and provides support for TypeORM as the ORM framework. PostgresQL is used as the backend database, with the default database being named 'postgres'. The boilerplate also includes packages for GraphQL implementation, such as graphql, apollo-server-express, and @nestjs/graphql. It follows a Code First approach for creating GraphQL schemas and provides protected queries/mutations using a NestJS guard. Custom CRUD functionalities are implemented to make the most of GraphQL's advantages.

Features:

  • NestJS: The boilerplate is built using NestJS as the foundation framework.
  • TypeORM: It integrates TypeORM for database operations, avoiding the use of pure SQL.
  • PostgresQL Database: PostgresQL is used as the backend database, with 'postgres' as the default database name.
  • GraphQL: The boilerplate includes packages for GraphQL implementation, using a Code First approach to generate GraphQL schemas.
  • Protected queries/mutations: Some GraphQL queries and mutations are protected by a NestJS guard, requiring authentication and potentially admin role.
  • Custom CRUD: Custom CRUD functionalities are implemented for GraphQL, allowing users to perform operations like GetMany or GetOne.
  • Code generator: The boilerplate includes a CRUD generator specific to NestJS.

Summary:

This NestJS boilerplate comes with integration for TypeORM, GraphQL, and PostgresQL. It provides a foundation for building web applications using NestJS and offers functionality like protected queries/mutations, custom CRUD operations, and a code generator. The installation process requires the NestJS CLI and the installation of project dependencies. Alternatively, the project can be run using Docker. Overall, this boilerplate offers a solid starting point for developing scalable and efficient applications.

nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

graphql
Graphql

A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.