NestJS, Prisma and GraphQL codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with NestJS, Prisma and GraphQL including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the NestJS, Prisma and GraphQL community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
cp .env.example .env
# fill env variables in `.env` file
npm ci
npm start
# http://localhost:3000/api
Application is written using NestJS, Prisma and GraphQL, but since backend API specification requires REST, graphql endpoint wrapped by REST API. It is the facade and work as microservice which sends all requests to graphql api.
src
- Main application source codesrc/api
- REST API wrapper under main applicationsrc/app.config.ts
- Application config fileprisma
- DB toolkit to query, migrate and model your database@generated
- Generated code
1: npm run start:dev
2: npm run api:spec
- v6 Nest.JS v6, TypeGraphQL, TSLint
- Passwords is not hashed
- GraphQL schema user's field
username
renamed toname
- Backend API spec
- Postman collection that you can use to test your API endpoints as you build your app.
- Why do we need copy migrations to docker?
- ArticleService.updateArticle() Updating tags does not working check it later
- Use case from clean architecture mybe use userservice.follow
autocannon -m POST -i body.json -H "Content-Type: application/json" http://localhost:3000/graphql