Query a local shell command, or HTTP API

I’d like to be able to use things like GitHub issues as a source for query results, i.e. something like:

query http get api.github.com/...

More flexible though (and easier frankly, with auth, repetition, etc.) would be to support shell commands:

query shell gh ...

(Using the GitHub CLI)

or a script (somewhere on my PATH) that maybe pipes to jq for some formatting or further filtering or whatever:

query shell logseq-gh-my-project-issues