Skip to content
Discussion options

You must be logged in to vote

@migbash
Hasura relies on postgres database triggers (in the backend) for event triggers and specifically creates triggers for EACH ROW.
It is not possible to have one Event Trigger for a batch INSERT/UPDATE, in the current product.

However, you can try a workaround solution which involves the following steps :

  • Create a new table (to be used as a proxy)

  • Create a postgres trigger that inserts records into the proxy table (after a bulk insert/update on the target tables). The trigger must be executed for EACH STATEMENT (not EACH ROW) Doc

  • Create a hasura event trigger based on inserts to the proxy table

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by migbash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants