Add support for multiple operations

A Query type worker now supports more than one function depending on the endpoint.