A GraphQL endpoint for https://data.gov.sg real-time APIs (Go/Golang)
Live demo available here: http://datagovsggraphqlgo-sogko.rhcloud.com/
(The deployed GraphQL endpoint on OpenShift has a some latency due to the datacenter being in US-East region and the Data.gov.sg API being in Singapore.)
Original APIs reference available here: https://developers.data.gov.sg/datagovsg-apis/apis
Environment
- https://api.data.gov.sg/v1/environment/2-hour-weather-forecast
- https://api.data.gov.sg/v1/environment/24-hour-weather-forecast
- https://api.data.gov.sg/v1/environment/4-day-weather-forecast
- https://api.data.gov.sg/v1/environment/pm25
- https://api.data.gov.sg/v1/environment/psi
- https://api.data.gov.sg/v1/environment/uv-index
Transport
- https://api.data.gov.sg/v1/transport/taxi-availability
- https://api.data.gov.sg/v1/transport/traffic-images
- Something to demonstrate how
graphql-go
resolve fields concurrently. - One approach to use GraphQL for existing REST(-ish?) APIs
- Just because.
graphql-go
based on an experimental branch that resolves fields concurrently. (The OpenShift deployment uses vendoring to support it)- Written a quick HTTP client for
data.gov.sg
API that coalesces identical API requests into one single request. Yay go-routines and go-channels. - Implemented GeoJSON GraphQL schema defined here https://github.com/sogko/graphql-schemas/tree/master/geojson
- Better documentation for GraphQL definitions
- Better TODO
- If you want to build/ is currently building / have already built something cool with this, let me know :)
Original API and retrieved dataset(s) are the property of Singapore Government and its Statutory Boards.
Everything else: MIT