Adding query-param parsing to publishQuery