Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SERVER
HOST=localhost
PORT=4001
CONNECTION=http
PROTOCOL=http
ENDPOINT=graphql
SUBSCRIPTIONS=subscriptions
PLAYGROUND=playground
Expand Down
20 changes: 20 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SERVER
HOST=localhost
PORT=4001
PROTOCOL=http
ENDPOINT=graphql
SUBSCRIPTIONS=subscriptions
PLAYGROUND=playground

# DATABASE
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres

# TYPEORM
TYPEORM_NAME=default
TYPEORM_HOST=localhost
TYPEORM_PORT=5432
TYPEORM_USERNAME=postgres
TYPEORM_PASSWORD=postgres
TYPEORM_DATABASE=postgres
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SERVER
HOST=localhost
PORT=4002
CONNECTION=http
PROTOCOL=http
ENDPOINT=graphql
SUBSCRIPTIONS=subscriptions
PLAYGROUND=playground
Expand Down
6 changes: 5 additions & 1 deletion codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ generates:
- eslint --fix
plugins:
- add: // Auto Generated. Please don't edit, the changes will be overwritten
- add:
content:
- 'import { CustomContext } from "../graphql/index"'
- 'typescript'
- 'typescript-resolvers'
config:
Expand All @@ -21,6 +24,7 @@ generates:
Date: Date
typesPrefix: I
skipTypename: true
contextType: CustomContext
enumsAsTypes: true
maybeValue: T | undefined
namingConvention:
Expand All @@ -30,4 +34,4 @@ generates:
plugins:
- schema-ast
config:
commentDescriptions: true
commentDescriptions: true
13 changes: 11 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
env_file:
- .env # configure postgres
volumes:
- pg_data:/var/lib/postgres/data # persist data even if container shuts down
- pg-data:/var/lib/postgres/data # persist data even if container shuts down

postgres-test:
image: postgres:11 # use 11th official postgres version
Expand All @@ -17,5 +17,14 @@ services:
env_file:
- .env.test # configure postgres
command: -p 5433

redis:
image: redis:latest
ports:
- 6379:6379
volumes:
- redis-data:/data

volumes:
pg_data: # named volumes can be managed easier using docker-compose
pg-data:
redis-data:
2 changes: 1 addition & 1 deletion ormconfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { loadEnv } from './src/lib/loadEnvoriment';
import { loadEnv } from './src/lib/loadEnvironment';
import { ConnectionOptions } from 'typeorm';

loadEnv();
Expand Down
143 changes: 119 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"@graphql-codegen/typescript": "^1.15.4",
"@graphql-codegen/typescript-resolvers": "^1.15.4",
"@types/bcrypt": "^3.0.0",
"@types/ioredis": "^4.17.2",
"@types/jest": "^26.0.3",
"@types/node": "^14.0.13",
"@types/yup": "^0.29.3",
"@types/uuid": "^8.0.0",
"apollo-server-testing": "^2.15.1",
"eslint": "^6.8.0",
"eslint-config-airbnb-typescript-prettier": "^2.1.1",
Expand All @@ -37,18 +39,21 @@
"@graphql-tools/schema": "^6.0.10",
"apollo-link": "^1.2.14",
"apollo-link-http": "^1.5.17",
"apollo-server-core": "^2.16.0",
"apollo-server-express": "^2.15.1",
"bcrypt": "^5.0.0",
"dotenv": "^8.2.0",
"eslint-plugin-jest": "^23.17.1",
"express": "^4.17.1",
"graphql": "^15.1.0",
"graphql-tag": "^2.10.3",
"ioredis": "^4.17.3",
"node-fetch": "^2.6.0",
"pg": "^8.2.1",
"reflect-metadata": "^0.1.13",
"typeorm": "^0.2.25",
"yup": "^0.29.1",
"uuid": "^8.2.0",
"zen-observable-ts": "^0.8.21"
}
}
Loading