Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 2.62 KB

README.md

File metadata and controls

43 lines (29 loc) · 2.62 KB

Trentino Trasporti Graphql

NodeJS Typescript Apollo-GraphQL Type-graphql GraphQL Express.js Prisma Postgres Docker GitHub Actions Heroku EsLint Prettier Deploy to heroku Maintained

A GraphQL backend for Trentino's public transports built for fun using Apollo Server, TypeGraphQL, Prisma, Docker & more....

Local setup

Install dependencies

npm install

Run docker container

docker-compose up

You can seed the database using

npm run prisma:seed

Server with sandbox is ready at http://localhost:8080/graphql

A testing environment with apollo server sandbox is deployed on heroku here.

Query Examples

Get all stops

curl 'http://localhost:8080/graphql' \
  -H 'Accept: */*' \
  -H 'content-type: application/json' \
  --data-raw '{"query":"query Stops {\n  stops {\n    stopId\n    stopName\n  }\n}\n","variables":{"where":{"stopId":"URBAN_2"}},"operationName":"Stops"}' \
  --compressed

GraphQL schema can be found here.