Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hantsy/nestjs-graphql-sample
NestJS GraphQL Example
https://github.com/hantsy/nestjs-graphql-sample
auth0 express graphql nestjs oauth2 oidc typeorm typescript
Last synced: about 2 months ago
JSON representation
NestJS GraphQL Example
- Host: GitHub
- URL: https://github.com/hantsy/nestjs-graphql-sample
- Owner: hantsy
- License: gpl-3.0
- Created: 2021-03-23T11:39:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-08T08:58:38.000Z (5 months ago)
- Last Synced: 2024-10-10T18:44:08.303Z (2 months ago)
- Topics: auth0, express, graphql, nestjs, oauth2, oidc, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 3.96 MB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NestJS GraphQL Sample
![frontend](https://github.com/hantsy/nestjs-graphql-sample/workflows/frontend/badge.svg)
![backend](https://github.com/hantsy/nestjs-graphql-sample/workflows/backend/badge.svg)
[![codecov](https://codecov.io/gh/hantsy/nestjs-graphql-sample/branch/master/graph/badge.svg)](https://codecov.io/gh/hantsy/nestjs-graphql-sample)A NestJS GraphQL sample project, including:
* Code first Nestjs/GraphQl development
* TypeORM with Postgres
* Passport/Jwt authentication with auth0.net IDP service
* Fully testing codes with Jest, jest-mock-extended, ts-mockito, etc.
* Github actions for continuous testing, code coverage report, docker image building, etc.## Docs
## Build
### Install dependencies```bash
$ npm install
```### Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```### Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## Resources
* [NestJS GraphQL chapter](https://docs.nestjs.com/graphql/quick-start)
* [The Anatomy of a GraphQL Query](https://www.apollographql.com/blog/the-anatomy-of-a-graphql-query-6dffa9e9e747/)
* [Developing a Secure API with NestJS: Managing Identity](https://auth0.com/blog/developing-a-secure-api-with-nestjs-adding-authorization/)
* [Developing a Secure API with NestJS: Managing Roles](https://auth0.com/blog/developing-a-secure-api-with-nestjs-adding-role-based-access-control/)