commanded v0.12.0 Commanded.Commands.Handler behaviour
Summary
Callbacks
Apply the given command to the event sourced aggregate root
Types
Callbacks
handle(aggregate, command)
handle(aggregate, command) :: domain_event | domain_events | nil | {:error, reason}
Apply the given command to the event sourced aggregate root.
You must return a list containing the pending events, or nil
/ []
when no events produced.
You should return {:error, reason}
on failure.