#gateway #graphql #federation


GraphGate is Apollo Federation implemented in Rust

4 releases (2 breaking)

0.5.1 Mar 26, 2021
0.5.0 Mar 24, 2021
0.4.0 Mar 23, 2021
0.3.2 Mar 22, 2021

#143 in WebSocket

46 downloads per month
Used in graphgate


4.5K SLoC


GraphGate is Apollo Federation implemented in Rust.

Quick start

A GraphQL API composed of 3 services (accounts, products, reviews).

docker run -p 8000:8000 scott829/graphgate-standalone-demo:latest

Open browser http://localhost:8000

Execute query

    topProducts {
        upc name price reviews {
            author {

Execute subscription

subscription {
    users {
        id username reviews {


What does Apollo Federation do?

To get the most out of GraphQL, your organization should expose a single data graph that provides a unified interface for querying any combination of your backing data sources. However, it can be challenging to represent an enterprise-scale data graph with a single, monolithic GraphQL server.

To remedy this, you can divide your graph's implementation across multiple composable services with Apollo Federation:

Unlike other distributed GraphQL architectures (such as schema stitching), Apollo Federation uses a declarative programming model that enables each implementing service to implement only the part of your graph that it's responsible for.

Why use Rust to implement it?

Rust is my favorite programming language. It is safe and fast, and is very suitable for developing API gateway.

What is the difference between GraphGate and Apollo Federation?

I guess the performance of GraphGate will be much better (I haven't done benchmarking yet, but will add it soon), and it supports subscription.


~524K SLoC