Update graph and vertex