GraphQL documentation lacks 'getting started' info such as the endpoint and authentication method

Context

I wanted to diagnose a customer issue which worked from the graphql-explorer but not from outside the browser. Having not used GraphQL I looked to our docs but got stuck quickly. I could see there was a python client, but couldn't find any info in our docs on how to configure it. We didn't appear to provide any indication what the schema was, and I couldn't see how authentication worked.

I eventually managed to find the endpoint from the vue source code and a curl example from https://developer.github.com/v4/guides/forming-calls/

Things we should have

  • Clear statement that the endpoint is /api/graphql
  • Explain how authentication works
  • Example request performed from the command line.

Example request

curl 'http://workhorse:8181/api/graphql' --header "Authorization: Bearer $GRAPHQL_TOKEN" --header "Content-Type: application/json" -X POST -d"{\"query\": \"query {currentUser {name}}\"}
Edited Nov 07, 2019 by James Edwards-Jones
Assignee Loading
Time tracking Loading