Skip to content

Commit 35eb000

Browse files
AlenaSviridenkojidiculasubatoi
authored
[GraphQL] Updating docs with GraphQL Explorer retirement (#57163)
Co-authored-by: Johanan <[email protected]> Co-authored-by: Ben Ahmady <[email protected]>
1 parent f933494 commit 35eb000

File tree

8 files changed

+89
-162
lines changed

8 files changed

+89
-162
lines changed

content/graphql/guides/forming-calls-with-graphql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If you access {% data variables.product.github %} at a different domain, such as
4949

5050
## Communicating with GraphQL
5151

52-
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use `curl` or any other HTTP-speaking library.
52+
Because GraphQL operations consist of multiline JSON, GitHub recommends using the [GraphQL Clients](/graphql/guides/using-graphql-clients) to make GraphQL calls. You can also use `curl` or any other HTTP-speaking library.
5353

5454
In REST, [HTTP verbs](/rest#http-verbs) determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is `POST`. The exception is an [introspection query](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api), which is a simple `GET` to the endpoint. For more information on GraphQL versus REST, see [AUTOTITLE](/graphql/guides/migrating-from-rest-to-graphql).
5555

content/graphql/guides/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ children:
1414
- /forming-calls-with-graphql
1515
- /using-global-node-ids
1616
- /migrating-from-rest-to-graphql
17-
- /using-the-explorer
17+
- /using-graphql-clients
1818
- /using-pagination-in-the-graphql-api
1919
- /managing-enterprise-accounts
2020
- /using-the-graphql-api-for-discussions

content/graphql/guides/managing-enterprise-accounts.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ For a list of the fields available with the Enterprise Accounts API, see [AUTOTI
3939

4040
## Getting started using GraphQL for enterprise accounts
4141

42-
Follow these steps to get started using GraphQL to manage your enterprise accounts:
43-
* Authenticating with a {% data variables.product.pat_generic %}
44-
* Choosing a GraphQL client or using the GraphQL Explorer
45-
* Setting up Insomnia to use the GraphQL API
42+
See [AUTOTITLE](/graphql/guides/using-graphql-clients) to get started using GraphQL to manage your enterprise accounts.
4643

4744
For some example queries, see [An example query using the Enterprise Accounts API](#an-example-query-using-the-enterprise-accounts-api).
4845

@@ -206,5 +203,5 @@ For more information about getting started with GraphQL, see [AUTOTITLE](/graphq
206203

207204
For more details about the new queries, mutations, and schema defined types available for use with the Enterprise Accounts API, see the sidebar with detailed GraphQL definitions from any [GraphQL reference page](/graphql).
208205

209-
You can access the reference docs from within the GraphQL explorer on GitHub. For more information, see [AUTOTITLE](/graphql/guides/using-the-explorer#accessing-the-sidebar-docs).
206+
You can access the reference docs from within the GraphQL clients. For more information, see [AUTOTITLE](/graphql/guides/using-graphql-clients).
210207
For other information, such as authentication and rate limit details, check out the [guides](/graphql/guides).
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Using GraphQL Clients
3+
intro: 'You can run queries on real {% data variables.product.prodname_dotcom %} data using various GraphQL clients and libraries.'
4+
redirect_from:
5+
- /v4/guides/using-the-explorer
6+
- /graphql/guides/using-the-explorer
7+
versions:
8+
fpt: '*'
9+
ghec: '*'
10+
ghes: '*'
11+
topics:
12+
- API
13+
---
14+
15+
## Using GraphQL client IDEs
16+
17+
There are many open-source GraphQL client IDEs you can use to access {% data variables.product.company_short %}'s GraphQL API.
18+
19+
See [AUTOTITLE](/graphql/guides/forming-calls-with-graphql) for extensive information on HTTP methods, authentication, and GraphQL call structure.
20+
21+
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](https://graphql.org/community/tools-and-libraries/?tags=services).
22+
23+
The following generic instructions will work with most GraphQL clients:
24+
1. Point the client at the GraphQL endpoint: `{% data variables.product.graphql_url %}`.
25+
1. Add an `Authorization` header: `Authorization: Bearer TOKEN` (replace `TOKEN` with your {% data variables.product.company_short %} {% data variables.product.pat_generic %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).
26+
1. Set the request method to `POST` or if it's available, use the client-provided GraphQL mode.
27+
1. Enter your query or mutation in the editor and, if needed, provide variables in the "Variables" panel.
28+
29+
Example:
30+
31+
```graphql
32+
query {
33+
viewer {
34+
login
35+
}
36+
}
37+
```
38+
39+
1. 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.
40+
41+
Minimal introspection query:
42+
43+
```graphql
44+
query IntrospectionQuery {
45+
__schema {
46+
types {
47+
name
48+
}
49+
}
50+
}
51+
```
52+
53+
1. Run the request and inspect the JSON response. Query from example should return the login associated with the {% data variables.product.company_short %} {% data variables.product.pat_generic %} you authenticated with.
54+
55+
Use the client UI to explore docs, run queries, and save requests as needed.
56+
57+
## {% data variables.product.prodname_cli %}
58+
59+
You can also use the command line with {% data variables.product.prodname_cli %} to run GraphQL queries.
60+
61+
1. Install and [authenticate with {% data variables.product.prodname_cli %}](https://cli.github.com/manual/gh_auth_login).
62+
1. Run a query against `{% data variables.product.graphql_url %}` using the GraphQL endpoint with the [`gh api` subcommand](https://cli.github.com/manual/gh_api).
63+
64+
Example:
65+
66+
```shell
67+
gh api graphql -f query='query { viewer { login } }'
68+
```
69+
70+
This should return the login associated with the {% data variables.product.company_short %} {% data variables.product.pat_generic %} you authenticated with.
71+
72+
## Requesting support
73+
74+
{% data reusables.support.help_resources %}

content/graphql/guides/using-the-explorer.md

Lines changed: 0 additions & 152 deletions
This file was deleted.

content/graphql/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ featuredLinks:
88
startHere:
99
- /graphql/guides/forming-calls-with-graphql
1010
- /graphql/guides/introduction-to-graphql
11-
- /graphql/guides/using-the-explorer
11+
- /graphql/guides/using-graphql-clients
1212
popular:
1313
- /graphql/overview/explorer
1414
- /graphql/overview/public-schema

content/graphql/overview/explorer.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ topics:
1313
autogenerated: graphql
1414
---
1515

16-
For more information about how to use the explorer, see [AUTOTITLE](/graphql/guides/using-the-explorer).
16+
<!-- expires 2025-11-01 -->
17+
<!-- We should change this to a note describing what's happened once the date is reached. -->
18+
19+
> [!WARNING]
20+
> The GraphQL Explorer as an embedded tool will be removed from the documentation on November 1, 2025. See our [changelog announcement](https://github.blog/changelog/2025-08-22-graphql-explorer-removal-from-api-documentation-on-november-1-2025).
21+
22+
For more information about how to explore {% data variables.product.prodname_dotcom %} GraphQL Schema, see [AUTOTITLE](/graphql/guides/using-graphql-clients).
23+
24+
<!-- end expires 2025-11-01 -->
1725

1826
{% ifversion ghec %}
1927

content/sponsors/integrating-with-github-sponsors/getting-started-with-the-sponsors-graphql-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ shortTitle: Sponsors GraphQL API
1313

1414
To get started with the GraphQL API, see [AUTOTITLE](/graphql/guides/introduction-to-graphql).
1515

16-
You can find the details about the Sponsors GraphQL API in the reference docs. For more information, see [AUTOTITLE](/graphql/reference). We recommend using the GraphQL explorer to build your GraphQL calls. For more information, see [AUTOTITLE](/graphql/guides/using-the-explorer).
16+
You can find the details about the Sponsors GraphQL API in the reference docs. For more information, see [AUTOTITLE](/graphql/reference). We recommend using the GraphQL clients to build your GraphQL calls. For more information, see [AUTOTITLE](/graphql/guides/using-graphql-clients).
1717

1818
## Known Issues
1919

0 commit comments

Comments
 (0)