gbfsQL: GraphQL wrapper for GBFS feeds
gbfsQL takes a list of GBFS feeds and exposes a dynamic GraphQL API that you can use. Pull requests are always welcome.
We support GBFS Version v1.1 and aim to update this project to newer releases as soon as they become available.
- SystemInformation, StationInformation, StationStatus, FreeBike, and SystemAlert endpoints
- Real-time updates via GraphQL Subscriptions
- Autodiscovory of available feeds
- Dashboard, listing all active feeds
gbfsQL will query the GBFS-Feed every time the TTL expires and cache results. That means requesting data from gbfsQL is very fast and will not incur an additonal request to the GBFS-Feed.
Try the Example below or use the follwing command to start a gbfsQL Docker container:
docker run -it --rm --name gbfsQL -e NODE_ENV=development -p 4000:4000 mapintelligenceagency/gbfsql -service <Name of Service>#<URL to */gbfs.json>
Create a docker-compose.yml file like this:
version: '3.3'
services:
gbfsql:
container_name: gbfsQL
command:
- '--services'
- 'JUMP_LA#https://gbfs.uber.com/v1/laxs/gbfs.json'
- 'UBIKE_UV#http://ubike.virginia.edu/opendata/gbfs.json'
- '--verbose'
# the dashboard will be at domain.com/dashboard
- '--dashboard'
environment:
- NODE_ENV=development
ports:
- '4000:4000'
image: mapintelligenceagency/gbfsqlStart gbfsQL with docker-compose up
Now you can visit the GraphiQL Board at http://localhost:4000 and query data using this sample query:
query {
JUMP_LA {
bikes {
lat
lon
}
}
UBIKE_UV {
stations {
name
currentStatus {
is_renting
}
}
}
}