Why change this to mutate `query`? Seems unrelated.