docs: correct example use of Github GraphQL (#2230)

Fixes #2229
This commit is contained in:
Aonghus Storey 2023-06-09 16:55:32 +01:00 committed by GitHub
parent d149afe07c
commit 864740a76f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -469,7 +469,7 @@ environment variable to the access token you have obtained.
```jinja2
{% set token = get_env(name="GITHUB_TOKEN") %}
{% set postdata = load_data(url="https://api.github.com/graphql", format="json", method="POST" ,content_type="application/json", headers=["accept=application/vnd.github.v4.idl", "authentication=Bearer " ~ token], body='{"query":"query { viewer { login }}"}')%}
{% set postdata = load_data(url="https://api.github.com/graphql", format="json", method="POST" ,content_type="application/json", headers=["accept=application/vnd.github.v4.idl", "authorization=Bearer " ~ token], body='{"query":"query { viewer { login }}"}')%}
{{postdata|safe}}
```