interface QueryHandlerRegistration
Since 0.1.0

One query handler and the query type the bus routes to it.

Properties

readonly
type: string

Query type name, matching query.type.

readonly
handler: IQueryHandler | RegistryFactory<IQueryHandler>

The handler to register for that type, or a factory that builds one from the service registry.

See CommandHandlerRegistration.handler for the instance and factory arms and their timing.

See

Usage

import { type QueryHandlerRegistration } from "cqrs-plugin/src/index.ts";