Skip to content

How to explore the graphql api

Bob Haugen edited this page Sep 25, 2017 · 1 revision

Go to http://127.0.0.1:8000/api/graph/ or http://localhost:8000/api/graph/ (however you run the back end django app)

You need a token to do anything. To create token:

mutation($username: String!, $password: String!) {
  createToken(username: $username, password: $password) {
    token
  }
}

using these query variables:

{"username": "yourusername", "password": "yourpassword"}

Then copy and paste the token into query variables like

{"token": "yourtoken"}

For more queries, look at the bottom of https://github.com/LearnDeepMilwaukee/valuenetwork/blob/master/valuenetwork/api/tests.py

Clone this wiki locally