31 releases

new 0.4.2 Jan 16, 2026
0.4.0 Nov 13, 2024
0.2.5 Feb 15, 2024
0.2.2 Feb 13, 2023
0.0.9 Dec 28, 2021

#38 in HTTP server

Download history 839/week @ 2025-09-26 780/week @ 2025-10-03 729/week @ 2025-10-10 913/week @ 2025-10-17 942/week @ 2025-10-24 655/week @ 2025-10-31 714/week @ 2025-11-07 691/week @ 2025-11-14 771/week @ 2025-11-21 649/week @ 2025-11-28 548/week @ 2025-12-05 817/week @ 2025-12-12 578/week @ 2025-12-19 327/week @ 2025-12-26 1022/week @ 2026-01-02 948/week @ 2026-01-09

3,020 downloads per month
Used in 5 crates (4 directly)

MIT license

630KB
19K SLoC

Hive GraphQL Platform

Hive Router (Rust)

A fully open-source MIT-licensed GraphQL API router that can act as a GraphQL federation Router, built with Rust for maximum performance and robustness.

[!TIP] 🚀 Blog post: Welcome Hive Router

Interested in the benchmark results? Check out the Federation Gateway Performance comparison

It can be run as a standalone binary or a Docker Image. Query planner can be used as a standalone Crate library.

Binary Releases | Docker Releases | Documentation

Try it out

Download Hive Router using the following install script:

curl -o- https://raw.githubusercontent.com/graphql-hive/router/main/install.sh | sh

At the moment, only Linux runtimes are supported using a binary, see Docker option below if you are using a different OS.

Create a simple configuration file that points to your supergraph schema file:

# router.config.yaml
supergraph:
  source: file
  path: ./supergraph.graphql

Alternativly, you can use environment variables to configure the router:

SUPERGRAPH_FILE_PATH=./supergraph.graphql

Then, run the router:

# By default, "router.config.yaml" is used for configuration. Override it by setting "ROUTER_CONFIG_FILE_PATH=some-custom-file.yaml"
# If you are using env vars, make sure to set the variables before running the router.
./hive_router

Binary

See GitHub Releases to the full list of release and versions.

Docker

The router image is being published to Docker to GitHub Container Registry. You may use it directly using the following command:

docker run \
  -p 4000:4000 \
  -e SUPERGRAPH_FILE_PATH="/app/supergraph.graphql" \
  -v ./my-supergraph.graphql:/app/supergraph.graphql \
  ghcr.io/graphql-hive/router:latest

Replace my-supergraph.graphql with a local supergraph file.

Alternativly, you can mount the configuration file using -v and pass all other configurations there:

docker run \
  -p 4000:4000 \
  -v ./router.config.yaml:/app/router.config.yaml \
  ghcr.io/graphql-hive/router:latest

Replace latest with a specific version tag, or a pre-release for one of the PRs (pr-<number> or sha-<commit-sha>).

To try the query planner, see bin/dev-cli/README.md for instructions to quickly use the qp-dev-cli for seeing the QP in action.

Local Development

  • Run cargo test_all to execute all unit tests.
  • Run cargo test_e2e to execute all e2e tests.
  • Run cargo test_qp to execute all query planner tests.
  • Run cargo test_qpe to execute all plan executor tests.
  • See lib/query-planner/README.md for more information, logging and configuration.

lib.rs:

graphql-tools

This library implements tooling around GraphQL for Rust libraries. Most of the tools are based on traits and structs implemented in graphql_parser crate.

Dependencies

~1.8–2.8MB
~60K SLoC