The spherical model on graphs