A GraphQL API wrapper around Synse Server's HTTP API.
Clone or download
KylerBurke Flask patch & lint fix (#42)
* patch: CVE-2018-1000656, remove docstrings so lint passes CI
Latest commit 4364ae1 Oct 30, 2018


CircleCI FOSSA Status

synse-graphql provides a GraphQL API that enables complex querying of your data center and IT equipment. The API comes with an interactive query application for exploration of the Synse APIs and provides a simple interface for common integrations.

Kick the tires

make run

At this point there is an interactive terminal running that you can do interactive queries with. Send your browser to http://localhost:5050/graphql and play around. Click the Docs tab on the right for the schema or go to tests/queries/ to look at some example queries.

To stop it, you can run:

make down

Note: the default configuration uses the embedded synse-server and emulator. If you'd like to use a different backend, check out --help.


docker run -it --rm vaporio/synse-graphql python synse_graphql --help
  • To specify which synse-server to collect data from, set the BACKEND environment variable to the url of synse-server.
  • You can specify multiple synse-server backends by passing more than one --backend.


Run the server

make build dev
python synse_graphql
  • From outside the container (or inside it), you can run curl localhost:5050

Use the query tool

make build dev
python synse_graphql &
./query.py --list
./query.py test_racks
./query.py --help

Run the tests (as part of development)

make build dev

See nosetests for some more examples. Adding @attr('now') to the top of a function is a really convenient way to just run a single test.

Getting isort errors?

  • See the changes:
isort graphql_frontend tests -rc -vb --dont-skip=__init_.py --diff
  • Atomic updates:
isort graphql_frontend tests -rc -vb --dont-skip=__init_.py --atomic

Testing (run the whole suite)

  • Tests assume a running, emulated synse-server on the same host. It uses localhost to talk to the router. If this isn't where you're running it, change the config.
  • make test


FOSSA Status