|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 21 KiB |
@@ -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`
|
||||
@@ -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.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. Include header information.
|
||||
- Add `Content-Type` as the header and `application/json` as the value.
|
||||

|
||||

|
||||
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.
|
||||

|
||||
1. In the "TOKEN" field, enter your {% data variables.product.pat_generic %} from an earlier step.
|
||||

|
||||
1. Click **Headers**.
|
||||

|
||||
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.
|
||||
|
||||
|
||||
@@ -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.
|
||||

|
||||
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 %}`.
|
||||
|
||||