How To Build a GraphQL API with TypeGraphQL and TypeORM. Read the article.
forked from rahmanfadhil/learn-typegraphql
Differences:
- node-config used for configuration
- refactor file names
- update all deps
- add Docker+Compose configuration
- use postgres db in containers
npm install
npm run startThis will start node server with database stored in sqlite3 file.
GraphQL playground at http://localhost:4000
docker-compose up -dThis will start node server with database and pg-admin in different containers.
GraphQL playground at http://localhost:4000
PG Admin GUI at http://localhost:4100 use admin/admin as login/password
{ hello }mutation {
createBook(data:{
title: "Megabook",
author: "Megamind"
}) {
id, title, author, isPublished
}
}{ books
{ id, title, author }
}