Projects STRLCPY graphql-engine Files
🤬
38 lines | ISO-8859-1 | 931 bytes

Setup tables

  1. Create table:
profile (
  id INT PRIMARY KEY,
  name TEXT
)

Setup AWS Lambda

Create a lambda function in AWS. This will be our webhook.

  1. Create a function.
  2. Select Ruby 2.5 as the runtime.
  3. Select "Author from scratch".
  4. Select "handler" as the function name.
  5. Press "Create function".
  6. Add API gateway as a trigger (in this example you can use Open as the security option).
  7. Add an API to API gateway.
  8. Add the code in lambda_function.rb to the lambda function editor. The handler function of your lambda will be the lambda_handler.

Add the trigger in Hasura GraphQL

  1. In events tab, add a trigger
  2. Select all insert, update, delete operations for the trigger.
  3. Paste the API endpoint of your AWS lambda as the webhook.

Test your integration

  1. Create a record.
  2. Update a record.
  3. Delete a record.
  4. Check the logs (in the Events tab) to see what is going on.
Please wait...
Page is in error, reload to recover