Add a way to modify query prior to creating proxy