Skip to content

Instantly share code, notes, and snippets.

@mbuczko
Created June 28, 2019 20:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mbuczko/3db9d3770fd49c3c9eb0912534e2d881 to your computer and use it in GitHub Desktop.
Save mbuczko/3db9d3770fd49c3c9eb0912534e2d881 to your computer and use it in GitHub Desktop.
emacs / restclient example
:graphql-url = https://api.github.com/graphql
:github-token := (auth-source-pass-get "token" "web/github")
:headers = <<
Authorization: Bearer :github-token
User-Agent: Emacs
#
:query-repos := <<
(graphql-query
((viewer
(repositories
:arguments
((first . 3)
(orderBy . ((direction . DESC)
(field . UPDATED_AT))))
(nodes
name
pushedAt)))))
#
POST :graphql-url
:headers
{ "query": ":query-repos"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment