- Create
ormconfig.jsonbased onormconfig.json.envandsrc/config.tsonsrc/config.ts.env
$ docker-compose exec api npm i
$ docker-compose up
- GraphQL & GraphQL Playground http://localhost:4000/graphql
- GraphQL metrics http://localhost:4000/graphql/metrics
npm run serve- Run GraphQL APInpm run migration- Handy shortcut for migration cmd (see https://typeorm.io/#/migrations)npm run lint- Run eslint fix on./src
ormconfig.json- Databasenodemon.json- For nodemon plugin for developmentdocker-compose.yml- Docker servicestsconfig.json- TypeScript compilation.eslintrc- For eslint
bootstrap- Contains functions for API bootstrapingmigrations- Contains all (non-)generated migrationsresolvers- Contains GraphQl resolversmodels- Contains GraphQL/Entity models, Repositories, Services and Input models, Args models - grouped by type
<Type>Resolver- Resolver (GraphQL resolver can be compared with REST API controller)<Type>Service- Service that provides data of<Type><Type>Input- Input data model, model that comes into resolver<Type>Args- Argument model, defines arguments in queries for<Type><Type>- GraphQL model (model that goes out from API) and Entity database model at once
- Apollo Server - GraphQL server
- TypeGraphQL - Layer for generation GraphQL schema from TypeScript
- Type ORM - Database layer (supports MySQL, MariaDB, PostgreSQL, CockroachDB, SQLite, MSSQL, Oracle and MongoDB)
- DataLoader - Batching/Caching data layer
- Class Validator - Provides decorators for validating class properties
- Apollo Metrics - Plugin to export basic GraphQL metrics
- TS Node - TypeScript executor for Node
- EsLint - Checking/Fixing code quality/standard tool
Mocha or https://github.com/alsatian-test/alsatian
- Add unit tests