Core Concepts
Subgraph Types
HyperRoute supports three subgraph types, allowing you to federate services regardless of their transport protocol:
| Type | Description | URL Format | Directive |
|---|---|---|---|
| GraphQL | Standard GraphQL subgraph (default) | http://host:port/graphql | None required |
| REST | HTTP/REST API backend | http://host:port | @rest on fields |
| gRPC | gRPC service backend | grpc://host:port | @grpc on fields |
Bundles
A bundle is an immutable deployment artifact pushed to the router. It contains everything the router needs to serve your federated graph:
bundle.tar.gz/
├── bundle.json # Metadata (snapshot_id, checksums)
├── supergraph.graphql # Composed supergraph SDL
├── subgraphs.json # Subgraph routing config (URLs, types)
├── router.yaml # Router configuration
├── ownership.json # Field-level ownership map
├── federation.json # Federation metadata
└── subgraphs/
├── users/
│ ├── schema.graphql
│ └── metadata.json
└── products/
├── schema.graphql
└── metadata.json
Snapshots
A snapshot is a deterministic, content-addressed identifier (UUIDv5) for a specific composition state. Same schemas always produce the same snapshot ID, enabling:
- Deduplication — identical compositions are never re-uploaded
- Idempotent deployments — pushing the same schemas is a no-op
- Traceability — every deployment is linked to an immutable snapshot
Environments
DevKit supports multiple environments (dev, staging, production, etc.) with independent registries and governance policies. Each environment has its own:
- Registry namespace — isolated storage for bundles and schemas
- Governance policies — approval requirements, breaking change rules
- Deployment targets — which router(s) receive bundles
How Routing Directives Work
GraphQL Query
│
▼
┌─────────────────┐
│ HyperRoute │
│ Router │ ← Reads @rest/@grpc from supergraph
└────────┬────────┘
│
┌────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────────┐ ┌──────────┐
│GraphQL │ │ REST/HTTP │ │ gRPC │
│Service │ │ GET /users │ │ GetProduct│
└────────┘ └────────────┘ └──────────┘
- Compose time — DevKit preserves
@rest/@grpcdirectives in the supergraph SDL - Bundle time — DevKit writes
type: "rest"ortype: "grpc"tosubgraphs.json - Runtime — Router parses directives from the supergraph and routes queries to the correct backend using the appropriate protocol
Next Steps
- Routing Directives — Full
@restand@grpcreference - CLI Reference — All commands at a glance