This is an example how to do GraphQL queries in a somewhat sane way in bash
using curl
and jq
.
The example does an query towards GitHub to fetch the commit SHAs of open pull requests for a specific repository.
The example needs the environment variables REPO_OWNER
, REPO_NAME
and GITHUB_TOKEN
to be set.