-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Would be good to have listeners on or custom functions for then, insert!, insert-unconditional!, retract!
At least four potential use cases:
-
Integrate in a parallel eav store (i.e. Datascript) for dynamic pull queries. User-supplied functions could perform mutations on a Datascript store at the same time as mutating Clara's session which would make them synchronized. This could relax the need for precept (while growing) to have an answer for every use case.
-
Server synchronization streams: Streaming to server might be easiest to handle as listeners/interceptors on mutation stream
-
Completely different streaming way to update view
-
Custom truth constraint maintenance (extend/tweak/relax constraints imposed by our schema implementation)
Note: we may want at some point mutation events themselves to pass through the rule system as action/commands (or something like them) so that rules can operate over not just "current state" (as now) but over the change events themselves. This could solve the above in a different way.
We may split this issue into listeners vs. custom mutation functions if we decide one way or the other or both.