Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nathanwaters/hasura-cloudflare-worker

Example Cloudflare Worker for Facebook-based authorization and GraphQL proxy queries with Hasura
https://github.com/nathanwaters/hasura-cloudflare-worker

cloudflare-worker cloudflare-workers facebook-login graphql hasura hasura-graphql

Last synced: about 1 month ago
JSON representation

Example Cloudflare Worker for Facebook-based authorization and GraphQL proxy queries with Hasura

Awesome Lists containing this project

README

        

# Hasura Cloudflare Worker

Example Cloudflare Worker using Facebook-based authorization and GraphQL proxy queries with Hasura.

## Prerequisites

1. [Cloudflare](https://www.cloudflare.com/products/cloudflare-workers/) account with Workers enabled ($5/mth minimum).
2. [Hasura](https://hasura.io/) GraphQL endpoint setup with `person` table, auth webhook (for GQL subscriptions) and [permissions](https://docs.hasura.io/1.0/graphql/manual/auth/basics.html) set on the `fb_id` plus a user `role` column.

## Install

1. Add config variables in .env
2. Run `npm install`
3. Run `npm run build`
4. Copy dist/worker.js code into Cloudflare Worker web UI
5. Save and test with [Insomnia](https://insomnia.rest/)