Repository navigation
Triggers and Extensibility
Daniele Zucchelli edited this page Aug 16, 2026
·
3 revisions
Endpoint triggers run around the selected database operation inside the operation transaction.
{
type: "PUT",
admin: ALL,
editor: { allowed: ["title", "status"], disallowed: [] },
triggers: [
{ type: "BEFORE", /* trigger condition/action */ },
{ type: "AFTER", /* trigger condition/action */ }
]
}Before triggers can transform the data used by the main operation or execute configured logic before it runs.
For updates and deletes, the engine can capture values before execution; mutation results and post-operation values may be made available to trigger logic. After triggers then run in the same transaction.
- Resolve request and policy.
- Open transaction.
- Run
BEFOREtriggers. - Run the main operation.
- Run
AFTERtriggers. - Commit or roll back.
disable_triggers: true in build options disables trigger execution.
- Keep trigger functions deterministic when possible.
- Avoid unbounded recursion: nested trigger queries are built with triggers disabled by the trigger runner.
- Treat user-defined functions as privileged application code.
- Keep external side effects out of a database transaction unless they are idempotent and coordinated.
- Test rollback behavior for trigger failures.
Caution
Trigger configuration is powerful and its exported type combines several action shapes. Until the API stabilizes, use repository examples and tests as the executable source of truth.
VoidQL is experimental and under active development · Documentation home · Status & limitations
Start Here
Learn & Build
- Learn VoidQL
- Build with VoidQL
- Query Operations
- Authorization Patterns
- Validation & Workflows
- Triggers & Extensibility
Use & Reference
Internals & Project