DependsOptions interface
What DependencyFor() declares for one class — any combination of requirements, an initializer and a loader.
Signature:
export interface DependsOptions<T>
Remarks
All three are optional, and each maps onto its @imqueue/graphql-dependency counterpart. Passing none is legal and registers a hook that does nothing.
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
DataInitializer<T> |
(Optional) An async routine that fills extra fields on this class's objects before its dependencies load, for values a requirement filter needs but the initial result does not carry. | ||
|
DataLoader<T> |
(Optional) The bulk fetch for this class, called whenever another class requires it. Every object it returns must carry an | ||
|
[() => DependentType, DependentTypeRelations[]][] |
(Optional) The classes this one owns, each paired with its relations — a thunk naming the dependent class, and one DependentTypeRelations per relation to it. Deferred through a thunk so a class can require another that is not defined yet, which is what makes circular relations expressible. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.