hasura / hasura/graphql-engine

Event Triggers add defer support

Open
#9,500 1 comment 1 reaction 0 assignees View on GitHub
a/eventing/data-triggers k/enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.