I saw a post about (graphile)[] and thought it sounded like a great way to take a DB and use via a javascript client very easily.

To get started I did this:

  1. Spin up a postgres database server

    $ docker run -d –name postgres -p 5432:5432 -v /opt/docker-volumes/postgres/data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres postgres

create a database

$ docker run -it --link postgres postgres createdb --host postgres -U postgres try_stuff
  1. Import some example data (if you’ve got no data)_

    $ wget “” $ docker run -it -v pwd:/tmp/x –link postgres postgres pg_restore –host postgres -U postgres –dbname try_stuff /tmp/x/example.dump

  2. Start the Graphile server

    $ npm install -g postgraphile $ npx postgraphile -c postgres://postgres:postgres@ –schema public

  3. Visit the graphiql endpoint in a browser and play about


  4. Use the api endpoint as you would any GraphQL service