API Reference / modelence / server / Module
Defined in: src/app/module.ts:40
The Module class is a core building block of a Modelence application that encapsulates related functionality. Modules can contain stores, queries, mutations, routes, cron jobs and configurations.
new Module(
name
,options
):Module
Defined in: src/app/module.ts:74
Creates a new Module instance
Parameter | Type | Description |
---|---|---|
name | string | The unique name of the module. This name is used to namespace queries, mutations, cron jobs and configuration values with a prefix (e.g. “todo.create”) |
options | { configSchema? : ConfigSchema ; cronJobs? : Record <string , CronJobInputParams >; mutations? : Mutations ; queries? : Queries ; rateLimits? : RateLimitRule []; routes? : RouteDefinition []; stores? : Store <any , any >[]; } | Module configuration options |
options.configSchema? | ConfigSchema | - |
options.cronJobs? | Record <string , CronJobInputParams > | - |
options.mutations? | Mutations | - |
options.queries? | Queries | - |
options.rateLimits? | RateLimitRule [] | - |
options.routes? | RouteDefinition [] | - |
options.stores? | Store <any , any >[] | - |
Module
API Reference / modelence / server / Module
Defined in: src/app/module.ts:40
The Module class is a core building block of a Modelence application that encapsulates related functionality. Modules can contain stores, queries, mutations, routes, cron jobs and configurations.
new Module(
name
,options
):Module
Defined in: src/app/module.ts:74
Creates a new Module instance
Parameter | Type | Description |
---|---|---|
name | string | The unique name of the module. This name is used to namespace queries, mutations, cron jobs and configuration values with a prefix (e.g. “todo.create”) |
options | { configSchema? : ConfigSchema ; cronJobs? : Record <string , CronJobInputParams >; mutations? : Mutations ; queries? : Queries ; rateLimits? : RateLimitRule []; routes? : RouteDefinition []; stores? : Store <any , any >[]; } | Module configuration options |
options.configSchema? | ConfigSchema | - |
options.cronJobs? | Record <string , CronJobInputParams > | - |
options.mutations? | Mutations | - |
options.queries? | Queries | - |
options.rateLimits? | RateLimitRule [] | - |
options.routes? | RouteDefinition [] | - |
options.stores? | Store <any , any >[] | - |
Module