mirror of
https://github.com/zhigang1992/graphql-engine.git
synced 2026-06-14 09:39:09 +08:00
Setup tables
- Create table:
notes:
id: int
note: text
Setup AWS Lambda
Create a lambda function in AWS. This will be our webhook.
- Create a function.
- Select Node.js 6 as the runtime.
- Select "start from scratch".
- Add API gateway as a trigger.
- Add an API to API gateway.
- Add the code in
index.js. The handler function of your lambda will be theindex.handler.
Add the trigger in Hasura GraphQL
- In events tab, add a trigger
- Select all insert, update, delete operations for the trigger.
- Paste the API endpoint of your AWS lambda as the webhook.