Skip to content

A GraphQL backend built for fun using Apollo Server, TypeGraphQL, Prisma, Docker & more....

License

Notifications You must be signed in to change notification settings

Pater999/trentino-trasporti-graphql

Repository files navigation

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.