Configuration (devkit.yaml)
The devkit.yaml file is the central configuration for your federation project. Run hyperroute init to generate a starter config.
Full Example
version: 2
project:
name: my-federation
# Subgraph definitions (used when pushing from config)
subgraphs:
# GraphQL subgraph (default type)
products:
schema: ./products/schema.graphql
url: http://products:4001/graphql
# REST subgraph
users:
schema: ./users/schema.graphql
url: http://users:4002
subgraph_type: rest
# gRPC subgraph
inventory:
schema: ./inventory/schema.graphql
url: grpc://inventory:50051
subgraph_type: grpc
grpc:
service: inventory.v1.ProductService
use_reflection: true
tls: false
# Platform API (governance & approvals)
platform:
url: https://platform.hyperroute.dev
org: my-org
project: my-federation
api_key_env: HYPERROUTE_API_KEY # env var name for API key
# Router control plane
router:
control_url: http://localhost:4000
# Environment configuration
environments:
dev:
publish: true
staging:
publish: true
production:
publish: true
approval_required: true
# Registry storage (S3, R2, GCS, or Azure Blob)
registry:
type: s3
bucket: my-federation-registry
region: us-east-1
prefix: federation/bundles/
Top-Level Keys
| Key | Description |
|---|---|
version | Config file version. Currently 2 |
project | Project metadata (name) |
subgraphs | Subgraph definitions — schemas, URLs, and types |
platform | Platform API connection for governance |
router | Router control plane URL |
environments | Per-environment settings (publishing, approvals) |
registry | Artifact storage backend configuration |
subgraphs
Define all subgraphs in your federation. Each key is the subgraph name.
GraphQL Subgraph
subgraphs:
products:
schema: ./products/schema.graphql
url: http://products:4001/graphql
REST Subgraph
subgraphs:
users:
schema: ./users/schema.graphql
url: http://users:4002
subgraph_type: rest
gRPC Subgraph
subgraphs:
inventory:
schema: ./inventory/schema.graphql
url: grpc://inventory:50051
subgraph_type: grpc
grpc:
service: inventory.v1.ProductService
use_reflection: true
tls: false
| Field | Description |
|---|---|
schema | Path to the GraphQL schema file |
url | Runtime URL the router uses to reach this backend |
subgraph_type | graphql (default), rest, or grpc |
grpc.service | Fully qualified gRPC service name |
grpc.use_reflection | Use gRPC server reflection (default: true) |
grpc.tls | Enable TLS for the gRPC connection |
platform
Configure the Platform API connection for governance workflows.
platform:
url: https://platform.hyperroute.dev
org: my-org
project: my-federation
api_key_env: HYPERROUTE_API_KEY
| Field | Description |
|---|---|
url | Platform API base URL |
org | Organization name |
project | Project name within the organization |
api_key_env | Name of the environment variable containing the API key |
environments
Per-environment settings control publishing and approval behavior.
environments:
dev:
publish: true
staging:
publish: true
production:
publish: true
approval_required: true
| Field | Description |
|---|---|
publish | Whether to publish bundles to the registry |
approval_required | Whether breaking changes require human approval |
registry
Configure the artifact storage backend.
registry:
type: s3
bucket: my-federation-registry
region: us-east-1
prefix: federation/bundles/
Supported types: s3, r2, gcs, azure, http.
| Field | Description |
|---|---|
type | Storage backend type |
bucket | Bucket/container name |
region | Cloud region |
prefix | Key prefix for all stored artifacts |