Skip to content

MiddlewareHistoryUpdate

Records a state update made by a specific middleware. Used to track the history of state transformations through the middleware chain.

const middleware: Middleware = {
name: 'audit-logger',
execute: (context, next) => {
// Check what previous middlewares did
context.history.forEach(update => {
console.log(`${update.name} modified:`, update.stateUpdate);
});
next();
}
};

name: string

The name of the middleware that made the update


stateUpdate: FlowStateUpdate

The state update that was applied