EventTrait constructor.
Protected Optional _configTrait instance configuration.
Protected _eventProtected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Protected Optional _typeTrait type.
Private _getPrivate
Returns event data to be sent to message bus.
{string} - Hook name. Used to determine which hook arguments to extract.
User context.
{VertexSchemaHooksParams} - Hook arguments array.
Private _getPrivate
Returns a pre-configured hook handler for a given action.
Entity hook name.
AWS EventBridge event detail type.
Private
Returns a pre-configured hook handler for a given action.
Rest ...args: VertexSchemaHooksParamsPrivate _getPrivate
Returns entity schema hook by it's name.
Entity schema.
Hook name.
Private _sendPrivate
Sends event message to EventBridge.
Promise
AWS EventBridge event detail type.
Event data.
User context.
Protected getAttaches Trait callbacks to schema item hooks.
Makes this Trait instance global.
This method is triggered when a trait callback has been activated
This is the name of the callback function to call.
References to the Graph Hanlder
Request data passed along as part of the request.
Configuration setter.
The new configuration.
Helper method for wrapping legacy Kosmos traits callbacks.
TODO: Remove this method once all Traits are converted.
Optional callbackName: stringOptional callback name; passing this parameter will additionally wrap the callback into legacy process().
Static traitGenerated using TypeDoc
The EventTrait is used to allow submitting events to a message bus.
Example of adding this trait :
Usage: