Expand description

This module provides types for event handlers. An event can be any occurrence during query processing to which a client library or application might want to add business logic. Examples include the before or after the creation of a new node.

Structs

Provides a simplified interface to utility operations inside an event handler.

Collects event handlers for application during query processing.

Type Definitions

Type alias for a function called after an event affecting a node. The output of this function will be used as the input to the next after event function. If there are no additional after event functions, then the result of this function will be returned as the result for base Warpgrapher create, read, and update operations. For delete operations, the number of nodes deleted will be returned instead.

Type alias for a function called after an event affecting a relationship. The output of this function will be used as the input to the next after event function. If there are no additional after event functions, then the result of this function will be returned as the result for base Warpgrapher create, read, and update operations. For delete operations, the number of relationships deleted will be returned instead.

Type alias for a function called after request execution allowing modifications to the output value.

Type alias for a function called before the engine is built and enable modifications to the configuration. A common use case is adding common properties to all types in the model.

Type alias for a function called before a mutation event. The Value returned by this function will be used as the input to the next before event function, or to the base Warpgrapher resolver if there are no more before event functions.

Type alias for a function called before an event. The Value returned by this function will be used as the input to the next before event function, or to the base Warpgrapher CRUD resolver if there are no more before event functions.

Type alias for a function called before request execution allowing modifications to the request context. Common use case includes pulling auth tokens from the metadata and inserting user information into the request context.