2020-01-14 15:57:45 +03:00
|
|
|
.. meta::
|
|
|
|
:description: Manage event triggers with Hasura
|
|
|
|
:keywords: hasura, docs, event trigger
|
|
|
|
|
2019-05-13 12:41:07 +03:00
|
|
|
Event Triggers
|
2018-09-11 14:11:24 +03:00
|
|
|
==============
|
|
|
|
|
2018-12-03 15:12:24 +03:00
|
|
|
.. contents:: Table of contents
|
|
|
|
:backlinks: none
|
|
|
|
:depth: 1
|
|
|
|
:local:
|
|
|
|
|
2018-09-11 14:11:24 +03:00
|
|
|
Hasura can be used to create event triggers on tables in the Postgres database. Event triggers reliably capture
|
2019-05-13 12:41:07 +03:00
|
|
|
events on specified tables and invoke webhooks to carry out any custom logic.
|
2018-09-11 14:11:24 +03:00
|
|
|
|
2019-03-13 13:03:45 +03:00
|
|
|
.. thumbnail:: ../../../img/graphql/manual/event-triggers/database-event-triggers.png
|
2018-11-23 16:02:46 +03:00
|
|
|
:class: no-shadow
|
2020-01-08 16:20:18 +03:00
|
|
|
:alt: Hasura event trigger architecture
|
2018-09-11 14:11:24 +03:00
|
|
|
|
2019-05-13 12:41:07 +03:00
|
|
|
Events can be of the following types:
|
|
|
|
|
|
|
|
- INSERT: When a row is inserted into a table
|
|
|
|
- UPDATE: When a row is updated in a table
|
|
|
|
- DELETE: When a row is deleted from a table
|
2019-09-11 10:17:14 +03:00
|
|
|
- MANUAL: Using the console or API, an event can be triggered manually on a row
|
2019-05-13 12:41:07 +03:00
|
|
|
|
2018-12-03 15:12:24 +03:00
|
|
|
**See:**
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
:titlesonly:
|
|
|
|
|
|
|
|
create-trigger
|
|
|
|
payload
|
|
|
|
serverless
|
|
|
|
samples
|
2019-05-13 12:41:07 +03:00
|
|
|
Invoke trigger via console <invoke-trigger-console>
|
2019-10-17 15:02:01 +03:00
|
|
|
clean-up
|