Simon Willison’s Weblog

Subscribe

Tuesday, 22nd February 2022

None
TIL Using curl to run GraphQL queries from the command line — I wanted to run a query against the GitHub GraphQL API using `curl` on the command line, while keeping the query itself as readable as possible. Here's the recipe I came up with (tested in both `bash` and `zsh`), with TOKEN replaced by my GitHub API personal access token:
Sighting 11:20 AM – 12:01 PM — Eastern Gray Squirrel, American Robin, Red-eared Slider
Eastern Gray Squirrel
Eastern Gray Squirrel
American Robin
American Robin
Red-eared Slider
Red-eared Slider
Monday, 21st February 2022
Wednesday, 23rd February 2022