Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/server / config

config

Strongly-typed configuration loader for the Graphorin server.

Operators ship a graphorin.config.ts (or .js / .mjs / JSON) file that calls defineConfig to construct a typed config object; the server runtime accepts either the raw object, a path to such a file, or a function that returns one.

Validation is performed via Zod so user-facing errors include the exact path of every failing field, not just a generic "TypeError: undefined".

Interfaces

InterfaceDescription
ServerConfigSpec-

Type Aliases

Type AliasDescription
DeliveryCommentaryPolicyConfig-
IdempotencyRequireKeyMode-
SecretRefStringString literal that flags a value as a SecretRef URI. The server's pre-bind step resolves every *Ref field through the @graphorin/security resolver registry before binding the listener; an unresolvable ref fails fast with import('./errors/index.js').PrebindSecretUnresolvableError.
SecretsSourceSelector for which SecretsStore flavour the server activates. Mirrors --secrets-source from DEC-136.
ServerConfigInputInput shape accepted by defineConfig. Every field is optional; missing values fall back to a documented default.

Variables

VariableDescription
ServerConfigSchemaZod schema for the resolved ServerConfigSpec. Exposed for advanced users that want to validate other config sources (env-only launch, CLI overrides, etc.).

Functions

FunctionDescription
defineConfigHelper for graphorin.config.ts files. Pure pass-through that provides editor autocomplete; the actual parsing happens at server startup so callers always see the same error path regardless of which loader (TS / JS / JSON) the operator picked.
parseServerConfigParse + validate user input. Returns a strongly-typed ServerConfigSpec; throws ConfigInvalidError on any invalid field with a flattened issue list.