hasura / hasura/graphql-engine
Event Triggers add defer support
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Currently Event Triggers generate an `AFTER TRIGGER` but it would be nice to have a defered check so instead of generating a regular `AFTER` trigger, It generates a [constraint trigger](https://www.postgresql.org/docs/9.0/sql-createconstraint.html) which is deferred.
The main reason is that in most cases if you are using hasura you'd probably have a lot of logic on the database side. So it would be nice to have the trigger execute at the end of the transaction.
Contributor guide
Research direction
Start by reading the linked PostgreSQL constraint-trigger documentation and tracing how Hasura Event Triggers currently generate AFTER triggers. The work is done when the generated trigger can be deferred and executes at the end of the transaction instead of immediately; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100