Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 2.15 KB

README.md

File metadata and controls

74 lines (57 loc) · 2.15 KB

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.

Currently Supported Features

We support GBFS Version v2.1-RC (compatible with release 2.0) and aim to update this project to newer releases as soon as they become available.

  • SystemInformation, StationInformation, StationStatus, FreeBike, Geofencing Zones and SystemAlert endpoints
  • Real-time updates via GraphQL Subscriptions
  • Autodiscovery of available feeds
  • Dashboard, listing all active feeds

Notes

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.

Quickstart

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>

Example

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/gbfsql

Start 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
      }
    }
  }
}

License

License: MIT