@cbnsndwch/zero-sources

SyncedQueryRegistry class

Home > @cbnsndwch/nest-zero-synced-queries > SyncedQueryRegistry

SyncedQueryRegistry class

Service for discovering and managing synced query handlers.

This service implements the discovery pattern similar to NestJS microservices, scanning for decorated methods and building a registry of query handlers.

Signature:

export declare class SyncedQueryRegistry implements OnModuleInit, OnApplicationBootstrap

Implements: OnModuleInit, OnApplicationBootstrap

Constructors

Constructor

Modifiers

Description

(constructor)(discoveryService, metadataScanner, reflector, moduleRef)

Constructs a new instance of the SyncedQueryRegistry class

Methods

Method

Modifiers

Description

getHandler(queryName)

Get a registered handler by query name.

getHandlerCount()

Get the total number of registered handlers.

getQueryNames()

Get all registered query names.

hasQuery(queryName)

Check if a query is registered.

onApplicationBootstrap()

Log registered handlers after application bootstrap.

onModuleInit()

Discover and register all synced query handlers on module initialization.

How was this page?