Skip to main content

This version of GitHub Enterprise was discontinued on 2023-01-18. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Using the Explorer

You can run queries on real GitHub data using the GraphQL Explorer, an integrated development environment in your browser that includes docs, syntax highlighting, and validation errors.

About the GraphQL Explorer

GraphiQL, also referred to in this documentation as the GraphQL Explorer, is a "graphical interactive in-browser GraphQL IDE."

Using GraphiQL

To use the GraphiQL app, download and install it from https://github.com/skevy/graphiql-app.

Configuring GraphiQL

  1. Get an OAuth token.
  2. Launch GraphiQL.
  3. In the upper-right corner of GraphiQL, click Edit HTTP Headers.
  4. In the Key field, enter Authorization. In the Value field, enter Bearer <token>, where <token> is your generated OAuth token. graphiql headers
  5. Click the checkmark to the right of the token to save it.
  6. To return to the editor, click outside of the Edit HTTP Headers modal.
  7. In the GraphQL Endpoint field, enter http(s)://<em>HOSTNAME</em>/api/graphql.
  8. In the Method dropdown menu, select POST.

Note: For more information about why POST is the method, see "Communicating with GraphQL."

You can test your access by querying yourself:

query {
  viewer {
    login
  }
}

If everything worked correctly, this will display your login. You're all set to start making queries.