HyperRoute

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

KeyDescription
versionConfig file version. Currently 2
projectProject metadata (name)
subgraphsSubgraph definitions — schemas, URLs, and types
platformPlatform API connection for governance
routerRouter control plane URL
environmentsPer-environment settings (publishing, approvals)
registryArtifact 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
FieldDescription
schemaPath to the GraphQL schema file
urlRuntime URL the router uses to reach this backend
subgraph_typegraphql (default), rest, or grpc
grpc.serviceFully qualified gRPC service name
grpc.use_reflectionUse gRPC server reflection (default: true)
grpc.tlsEnable 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
FieldDescription
urlPlatform API base URL
orgOrganization name
projectProject name within the organization
api_key_envName 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
FieldDescription
publishWhether to publish bundles to the registry
approval_requiredWhether 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.

FieldDescription
typeStorage backend type
bucketBucket/container name
regionCloud region
prefixKey prefix for all stored artifacts