Extract an interface for the query controller