Practice TypeGraphQL with Apollo, Express, Postgres, Redis, Typeorm and Typescript
MIT License
TypeGraphQL with Apollo, Express, Postgres, Redis, Typeorm and Typescript
cp .env.example .env # modify variables
cp ormconfig.example.json ormconfig.json # modify variables
docker-compose up
# connect to docker database container
create database <database-name>; # ormconfig.json
yarn start
Visit http://localhost:4000/graphql
"request.credentials": "include"
check schema docs
mutation {
register(data:{
firstName:"",
...
}) {
id
firstName
...
}
}
mutation {
login(email:"", password:"") {
id
firstName
...
}
}
query {
me {
id
firstName
lastName
email
name
}
}
Ben Awad TypeGraphQL series playlist
# locate test-utils
cp ormconfig.test.example.json ormconfig.test.json # copy and modify variables
yarn test
yarn test:watch # watch mode - lacks resetting database