Class BehavioursSchemaManager

Behaviours Schema Manager is responsible for attaching Behaviours to schema items.

Hierarchy

  • BehavioursSchemaManager

Constructors

Properties

Methods

Constructors

Properties

behaviours: BehaviourBase<string, KosmosConfig<string>, InstanceConfig<string>>[]

Methods

  • Calls hookIntoSchema() method for all available Behaviours. Some behaviours may be NOT enabled for specific schema items, yet we still call them, so they could register their stuff in GraphQL schema.

    Parameters

    • schemaItem: SchemaItem<SchemaItemType>

      The schema item object.

    • wrapper: BehaviourResolverWrapper<InstanceConfig<string>, any, Record<string, any>, Promise<any>>

      The GraphQL -> Behaviour resolver wrapper callback. Due to the nature of Behaviours, GraphQL schema changes and resolvers are registered early at initialization stage while the real behaviour callback could not even be called at runtime; thus the wrapper is used to check if Behaviour is enabled before executing the real callback.

    Returns void

Generated using TypeDoc