Awesome
Hasura Cloudflare Worker
Example Cloudflare Worker using Facebook-based authorization and GraphQL proxy queries with Hasura.
Prerequisites
- Cloudflare account with Workers enabled ($5/mth minimum).
- Hasura GraphQL endpoint setup with
person
table, auth webhook (for GQL subscriptions) and permissions set on thefb_id
plus a userrole
column.
Install
- Add config variables in .env
- Run
npm install
- Run
npm run build
- Copy dist/worker.js code into Cloudflare Worker web UI
- Save and test with Insomnia