/graphql-openfaas-demo

GraphQL Gateway to OpenFAAS functions

Primary LanguageJavaScript

GraphQL-OpenFaaS Demo

The idea is to run a generic GraphQL server configured with a schema file/URL and proxy any request to a specific function provided by OpenFaaS.

CLI

brew install faas-cli

Setup local OpenFaaS

docker swarm init
yarn deploy:local

Build functions

faas-cli build

Deploy functions

faas-cli deploy

Demo

yarn start

Goto http://localhost:4000/ and send a query to the GraphQL server:

query {
  greet(name: "OpenFaaS")
}

Goto http://127.0.0.1:8080/ui/ to see the OpenFaaS dashboard.