Using GraphQL client IDEs
There are many open-source GraphQL client IDEs you can use to access GitHub's GraphQL API.
See Erstellen von Aufrufen mit GraphQL for extensive information on HTTP methods, authentication, and GraphQL call structure.
First, choose a client. Common options include GraphiQL, Insomnia, and Altair (desktop/web/extension). You can see the full list of clients in the GraphQL organization's tool directory.
The following generic instructions will work with most GraphQL clients:
-
Point the client at the GraphQL endpoint:
https://api.github.com/graphql
. -
Add an
Authorization
header:Authorization: Bearer TOKEN
(replaceTOKEN
with your GitHub personal access token. For more information, see Verwalten deiner persönlichen Zugriffstoken). -
Set the request method to
POST
or if it's available, use the client-provided GraphQL mode. -
Enter your query or mutation in the editor and, if needed, provide variables in the "Variables" panel.
Example:
query { viewer { login } }
-
If your client needs a schema for documentation rendering or autocomplete, fetch it via a GraphQL introspection query. Many clients can do this automatically from the "Docs" panel.
Minimal introspection query:
query IntrospectionQuery { __schema { types { name } } }
-
Run the request and inspect the JSON response. Query from example should return the login associated with the GitHub personal access token you authenticated with.
Use the client UI to explore docs, run queries, and save requests as needed.
GitHub CLI
You can also use the command line with GitHub CLI to run GraphQL queries.
- Install and authenticate with GitHub CLI.
- Run a query against
https://api.github.com/graphql
using the GraphQL endpoint with thegh api
subcommand.
Example:
gh api graphql -f query='query { viewer { login } }'
This should return the login associated with the GitHub personal access token you authenticated with.
Requesting support
Um Fragen, Fehlerberichte und Diskussionen zu GitHub Apps, OAuth apps und API-Entwicklung zu finden, durchsuche das Kategorie „API“ und „Webhooks“ in GitHub-Community-Diskussionen. Die Diskussionen werden von GitHub-Mitarbeitern moderiert und gepflegt und von der GitHub-Community beantwortet.
Wende dich bei folgenden Anliegen über das Kontaktformular direkt an den GitHub-Support:
- Garantierte Antwort von GitHub-Personal
- Supportanfragen, die vertrauliche Daten oder private Anliegen enthalten
- Funktionsanfragen
- Feedback zu GitHub-Produkten