mirumee / gql-federation-gateway

Simple gateway for Apollo Federation with JWT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graphql Federation Gateway

This is a simple gateway that exposes uniform GraphQL API for multiple services using Apollo Federation. Runs on Apollo Server.

Configuration

Services

The only one settings that service really needs is a list of GraphQL endpoints in the federation along with their identifying aliases:

export ENDPOINTS="first:http://host:8000/graphql/ second:http://host2:8000/graphql/"

Endpoints must be separated by spaces and a name is finished by the first colon.

Polling

Gateway will poll services to update schema on regular intervals. Default interval is 6 seconds, you can change it with POLLING_INTERVAL environment variablem which is in miliseconds.

export POLLING_INTERVAL=10000

This whill set polling interval to 10 seconds.

About

Simple gateway for Apollo Federation with JWT

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 84.2%Language:Dockerfile 15.8%