Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed assets/images/developer/graphiql-headers.png
Binary file not shown.
Binary file modified assets/images/developer/graphql/insomnia-base-url-and-pat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/developer/graphql/insomnia-bearer-token-option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/developer/graphql/json-content-type-header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
21 changes: 10 additions & 11 deletions content/graphql/guides/managing-enterprise-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For some example queries, see "[An example query using the Enterprise Accounts A

1. To authenticate with GraphQL, you need to generate a {% data variables.product.pat_generic %} from developer settings. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."

2. Grant admin and full control permissions to your {% data variables.product.pat_generic %} for areas of GHES you'd like to access. For full permission to private repositories, organizations, teams, user data, and access to enterprise billing and profile data, we recommend you select these scopes for your {% data variables.product.pat_generic %}:
2. Grant admin and full control permissions to your {% data variables.product.pat_generic %} for areas of your enterprise you'd like to access. For full permission to private repositories, organizations, teams, user data, and access to enterprise billing and profile data, we recommend you select these scopes for your {% data variables.product.pat_generic %}:
- `repo`
- `admin:org`
- `user`
Expand Down Expand Up @@ -84,16 +84,15 @@ The next steps will use Insomnia.
- For your enterprise instance: `https://<HOST>/api/graphql`
- For GitHub Enterprise Cloud: `https://api.github.com/graphql`

2. To authenticate, open the authentication options menu and select **Bearer token**. Next, add your {% data variables.product.pat_generic %} that you copied earlier.

![Permissions options for {% data variables.product.pat_generic %}](/assets/images/developer/graphql/insomnia-base-url-and-pat.png)

![Permissions options for {% data variables.product.pat_generic %}](/assets/images/developer/graphql/insomnia-bearer-token-option.png)

3. Include header information.
- Add `Content-Type` as the header and `application/json` as the value.
![Standard header](/assets/images/developer/graphql/json-content-type-header.png)
![Header with preview value for the Audit Log API](/assets/images/developer/graphql/preview-header-for-2.18.png)
1. Select the "Auth" menu and click **Bearer Token**. If you've previously selected a different authentication method, the menu will be labeled with that method, such as "Basic Auth", instead.
![Screenshot of the expanded "Auth" menu in Insomnia. The menu label, "Auth", and the "Bearer Token" option are outlined in dark orange.](/assets/images/developer/graphql/insomnia-bearer-token-option.png)
1. In the "TOKEN" field, enter your {% data variables.product.pat_generic %} from an earlier step.
![Screenshot of the "Bearer" authentication settings in Insomnia. The "TOKEN" field is outlined in dark orange.](/assets/images/developer/graphql/insomnia-base-url-and-pat.png)
1. Click **Headers**.
![Screenshot of the settings tabs in Insomnia. The "Headers" tab is outlined in dark orange.](/assets/images/developer/graphql/json-content-type-header.png)
1. Under the **Headers** tab, click **Add**.
1. In the "header" field, enter `Content-Type`.
1. In the "value" field, enter `application/json`.

Now you are ready to start making queries.

Expand Down
4 changes: 2 additions & 2 deletions content/graphql/guides/using-the-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ To use the GraphiQL app, download and install it from https://github.com/skevy/g
1. Get an [OAuth token](/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql).
1. Launch GraphiQL.
1. In the upper-right corner of GraphiQL, click **Edit HTTP Headers**.
1. In the **Key** field, enter `Authorization`. In the **Value** field, enter `Bearer <token>`, where `<token>` is your generated OAuth token.
![graphiql headers](/assets/images/developer/graphiql-headers.png)
1. In the **Key** field, enter `Authorization`.
1. In the **Value** field, enter `Bearer TOKEN`, replacing `TOKEN` with your OAuth token from the first step.
1. Click the checkmark to the right of the token to save it.
1. To return to the editor, click outside of the **Edit HTTP Headers** modal.
1. In the **GraphQL Endpoint** field, enter `{% data variables.product.graphql_url_pre %}`.
Expand Down