Class ReactionTrait

The ReactionTrait is used to allow submitting events to a message bus.

Hierarchy

  • Trait<ReactionTraitConfig>
    • ReactionTrait

Constructors

Properties

_config?: ReactionTraitConfig

Trait instance configuration.

_global: boolean = false

Whether this is a global (not bound to any specific schema item) trait instance.

_type?: "reaction"

Trait type.

controlTriggersEnabled: boolean
graphqlSchemaManager: GraphQLSchemaManager
logger: Logger
reactionsEnabled: boolean = true
reactionsMutationAdded: boolean = false

Methods

  • Parameters

    • _parent: unknown
    • args: Record<string, any>

    Returns Promise<boolean>

  • This method is triggered when a trait callback has been activated

    Type Parameters

    • RT = any

    • Payload = any

    Parameters

    • callbackName: string

      This is the name of the callback function to call.

    • datasourceWrapper: DataSourceWrapper

      References to the Graph Hanlder

    • data: TraitDataObject<RT, Payload, Promise<any>>

      Request data passed along as part of the request.

    Returns Promise<RT>

  • Configuration setter.

    Parameters

    • config: ReactionTraitConfig

      The new configuration.

    Returns void

Generated using TypeDoc