Created
February 20, 2019 09:36
-
-
Save CodebyOmar/669591805c08e1339d65a53c68687368 to your computer and use it in GitHub Desktop.
Setting up Hasura Event Triggers via API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "bulk", | |
"args": [ | |
{ | |
"args": { | |
"headers": [], | |
"insert": { | |
"columns": [ | |
"id", | |
"username", | |
"last_seen", | |
"last_typed", | |
"date_created" | |
] | |
}, | |
"name": "add-user-to-rooms", | |
"table": { | |
"name": "users", | |
"schema": "public" | |
}, | |
"webhook": "https://<YOUR_NGROK_URL>/addtorooms" | |
}, | |
"type": "create_event_trigger" | |
}, | |
{ | |
"args": { | |
"headers": [], | |
"insert": { | |
"columns": [ | |
"id", | |
"msg_text", | |
"username", | |
"room_id", | |
"msg_timestamp" | |
] | |
}, | |
"name": "send-push-notification", | |
"table": { | |
"name": "messages", | |
"schema": "public" | |
}, | |
"webhook": "https://<YOUR_NGROK_URL>/send/notification" | |
}, | |
"type": "create_event_trigger" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment