Making deployment query part of a helper.