Added a query context and published state.