Make graph immutable.