GitHub API GraphQL snippets

Every time I try to use GitHib’s GraphQL API I find myself totally lost, so here are some snippets I have found useful.

All of these can be pasted into the GitHub GraphQL API Explorer, which can run the code as your logged-in user in the browser without the need to go through an authentication dance.

I will add more over time, and feel free to add any you like in the comments.

List all the projects in an organisation

    organization(login: "matrix-org") {
      projectsV2(first: 20) {
        nodes {

Live code reviews make life better

I’ve just got off a call with a colleague. During that call I:

  • learned a lot about how the work he is doing fits in with what my team is working on
  • understood the specific code we were discussing much better than if I’d looked at it alone
  • helped him find a whole bit of code we didn’t actually need (the best kind of code)!
  • helped him figure out something else he has been musing about, that was mostly unrelated
  • had a nice chat and felt much better about life

Asynchronous code reviews can feel like a duty I must perform, and one that distracts me from what I’m doing. Meanwhile, when receiving such reviews, if we’re not careful it can feel like someone criticising for criticism’s sake, or just making your work take longer. As an offline reviewer I don’t often remember to say what I like as well as what I’d want to change, and I normally feel a push to suggest at least one change just to prove I read the code.

Live reviews are so much better! They:

  • are full of opportunities to learn, for both people
  • help you understand the code so you can do a better review
  • often lead the person who wrote the code to spot improvements that the reviewer had no chance of seeing
  • don’t have to be the whole review: you can still take your time to think carefully after the discussion, before clicking Submit
  • can be fun, and give you a chance to interact with your colleagues

I much prefer them. I’m going to do more.

Air-Source Heat Pump – 1 year later

10 months ago I wrote a blog post Air-Source Heat Pump – our experience so far, 2 months in about our new air source heat pump. Have a look back at that for photos of the device itself and more detail about installation etc.

Less energy

We used a lot less energy this year than last year. Here’s the graph for 2 years:

Graph showing 2 years of energy usage on gas and electricity. Gas usage stops halfway through because a heat pump was installed. The second year's gas usage is much lower than the first, especially during the heavy use, cold months.

As you can see, we used a lot less energy in kWh this year than last year. Air source heat pumps work!

More money

Our energy cost more this year than last year. I’ve calculated this graph based on fixed prices, and I used 2021 prices to keep consistency with the last blog post, but the real-prices story is similar. Here is the graph for the last 2 years:

Graph showing energy cost per day over 2 years. The first half shows gas usage, which drops to zero in the middle when a heat pump was installed. The second half is higher, showing that the cost of the electricity this year was more than last year. Towards the end, solar panels were installed and the cost drops below last year.

Why did our cost go up when our energy usage went down so dramatically?

Because electricity is too expensive!

Electricity is the right way to power our cars and homes, because it can be sourced sustainably, and in fact much of it really is being sourced sustainably right now.

Artificially-high electricity prices are preventing people switching to a better way.

Solar panels help!

In September this year we had solar panels installed. They look great and are working incredibly well. We were getting 10kWh per day from them in September. We don’t have a battery yet, but when it arrives we think we will be able to cover most of our summer energy costs using these panels.

Since the panels were installed, our reduced use of grid electricity meant that our energy costs for this year dropped below last year. Obviously it’s too soon to say for sure what the full impact is, but I can say we are very happy with our solar panels.

Our house is cozy

Our new heat pump heats our leaky house very well, and we are nice and cozy, even when temperatures outside drop below zero. The heat pump is less efficient when it’s cold outside, but still way better than a gas boiler.

Installed by Your Energy Your Way

[My wife used to be director of the company, so I declare an interest.]

Our heat pump, radiators and panels were installed by Your Energy Your Way and I can recommend them for good communication, service and quality.

Deleted my Twitter account

Update: my twitter archive is here:

Update: you can see the hacky scripts I used to build this, based on twitter-archive-parser.

This evening I deleted my Twitter account. I’m feeling surprisingly unsettled by doing it, to be honest.

The Twitter mobile interface showing that my account has been deactivated.

I can’t participate in a platform that gives a voice to people who incite violence. I said I would leave if Trump were re-instated, and that is what I am doing. I know Twitter has failed in the past in many ways, but this deliberate decision is the last straw.

I have downloaded the archive of my tweets, and I will process it and upload it to my web site as soon as possible.

You can find me at

If you’d like help finding your way onto Mastodon, feel free to ask me for help via Mastodon itself, or by email on andybalaam at