method IQueryBus.execute IQueryBus.execute<TResult = unknown>(query: CqrsQuery): Promise<TResult> Executes a query. Type Parameters TResult = unknown The expected result type Parameters query: CqrsQuery The query to execute Return Type Promise<TResult> The handler's result Throws HandlerNotFoundError (from the plugin) — as a REJECTION — if no handler is registered for query.type TypeError — as a REJECTION — if query.type is not a string