Skip to content

AbstractModule

Module in @evolve-framework/core

The base class of every module.

import { AbstractModule } from "@evolve-framework/core";
new AbstractModule()
MethodDescription
getGraphQLConfig(): GraphQLConfig | undefinedThe type definitions and resolvers this module adds to the GraphQL schema, or undefined when it serves no GraphQL.
getGraphQLSchema(): string | undefinedThe type definitions of getGraphQLConfig() printed as SDL, which codegen reads without running the service.
getHttpConfig(): HttpConfig | undefinedThe routes and route-scoped Fastify plugins this module registers on the HTTP server, or undefined when it has none.
getInternalEventConfig(): InternalEventConfig | undefinedThe internal events this module handles, if any.
init(): void | Promise<void>One-shot initialization hook for side-effecty setup that must not run at construction time — typically building SDK clients or registering module-scoped singletons.
close(): void | Promise<void>Optional cleanup hook called by Application.stop() after the HTTP server has closed.