Open system quantum thermodynamics of time-varying graphs