HyperRoute

Push & Governance

hyperroute push

The primary command for deploying schema changes. In one step, it reads your subgraph schema, composes the supergraph, validates it, checks governance policies, and activates the bundle on the router.

hyperroute push [OPTIONS]

Options

Schema Identity

FlagTypeDefaultDescription
--name <NAME>StringSubgraph name — unique identifier within the federation
--schema <PATH>PathPath to the GraphQL schema file (SDL)
--url <URL>StringSubgraph routing URL for the router to reach this backend

Subgraph Type

FlagTypeDefaultDescription
--subgraph-type <TYPE>EnumgraphqlTransport protocol: graphql, rest, or grpc

gRPC-Specific Options

FlagTypeDefaultDescription
--grpc-service <NAME>StringFully qualified gRPC service name (required for gRPC)
--proto-file <PATH>PathPath to .proto file (optional)
--grpc-reflection <BOOL>BooltrueUse gRPC server reflection
--grpc-tlsFlagfalseEnable TLS for the gRPC connection

Environment & Configuration

FlagTypeDefaultDescription
-e, --env <ENV>StringdevTarget environment (dev, staging, production, local)
-c, --config <PATH>Path.Path to devkit.yaml
--output <PATH>Path.Output directory for local mode

Deployment Mode

FlagTypeDescription
--localFlagLocal development mode — no cloud, no governance
--forceFlagForce deployment — skip governance checks (audit-logged)
--skip-policyFlagSkip policy checks only

Governance & CI Options

FlagTypeDefaultDescription
-m, --message <MSG>StringChange description for reviewers
--waitFlagBlock until approval resolves
--timeout <SECS>Integer300Wait timeout
--jsonFlagJSON output for CI/CD pipelines
--statusFlagCheck environment status only
--git-sha <SHA>StringautoGit commit SHA for metadata
--git-branch <BRANCH>StringautoGit branch for metadata

Local Mode vs Cloud Mode

Local Mode (--local or --env local)

For local development. No cloud services required.

hyperroute push --local \
  --name users-api \
  --schema users-api.graphql \
  --url http://localhost:4001 \
  --subgraph-type rest

What happens:

  1. Local file-system registry — Schemas stored in .hyperroute-registry/
  2. No Platform API — No authentication, no governance checks
  3. Direct router push — Bundle pushed to localhost:4000 via Control API
  4. Instant activation — No proposal/approval cycle
Developer Machine
┌─────────────────────────────────────────────┐
│                                             │
│  hyperroute push --local                    │
│       │                                     │
│       ├─▶ .hyperroute-registry/  (schemas)  │
│       ├─▶ .hyperroute/          (bundle)    │
│       └─▶ localhost:4000        (router)    │
│                                             │
│  No cloud. No auth. No approvals.           │
└─────────────────────────────────────────────┘

Cloud Mode (--env dev, --env production, etc.)

For team environments and production. Full governance pipeline.

hyperroute push \
  --env production \
  --name users-api \
  --schema users-api.graphql \
  --url http://users-api:4001 \
  --subgraph-type rest \
  -m "Added pagination to user list endpoint"

What happens:

  1. Cloud registry — Schemas published to S3/R2/GCS/Azure Blob
  2. Platform API — Authenticated via HYPERROUTE_API_KEY
  3. Breaking change detection — Automatic diff against current active schema
  4. Approval workflow — Breaking changes require human approval
  5. Bundle activation — Once approved, bundle is pushed to target routers
  6. Audit trail — Every operation recorded with timestamps and identity
┌──────────┐    ┌────────────────┐    ┌──────────────┐    ┌──────────┐
│  DevKit  │───▶│  Platform API  │───▶│  Registry    │───▶│  Router  │
│  CLI     │    │  (Governance)  │    │  (S3/R2/GCS) │    │ (Routerd)│
└──────────┘    └────────┬───────┘    └──────────────┘    └──────────┘
                         │
                  Breaking changes?
                         │
              ┌──── No ──┴── Yes ────┐
              │                      │
          Auto-deploy          Create proposal
          exit 0               exit 10
                                     │
                               Await approval
                                     │
                              Re-run push
                              exit 0

Comparison

AspectLocal ModeCloud Mode
Flag--local or --env local--env dev/staging/production
RegistryLocal filesystemCloud storage (S3, R2, GCS)
AuthenticationNoneHYPERROUTE_API_KEY env var
GovernanceNone — always deploysFull — proposals for breaking changes
Router pushDirect to localhost:4000Via Platform API
Audit loggingLocal onlyFull cloud audit trail
ConcurrencySingle developerMulti-user with locking

Governance Workflow

┌─────────────────┐     ┌──────────────┐     ┌──────────────┐
│  1. Push Schema │────▶│ 2. Platform  │────▶│ 3. Router    │
│  (DevKit CLI)   │     │ (Governance) │     │ (Activation) │
└────────┬────────┘     └──────┬───────┘     └──────────────┘
         │                     │
         │  Breaking changes?  │
         │                     │
         ├── No ──────────────▶│  Auto-deploy → exit 0
         │                     │
         └── Yes ─────────────▶│  Create proposal → exit 10
                               │  (wait for approval)
                               │
                               │  After approval:
                               │  Re-run push → exit 0

Exit Codes

CodeMeaningCI Action
0Success — deployed and activatedContinue pipeline
10Pending approval — proposal createdWait / notify
11Rejected — proposal was deniedFail pipeline
12Policy violation — blocked by policyFail pipeline
13Registry error — storage issueRetry
14Platform API error — governance service issueRetry
15Router activation error — router rejected bundleInvestigate

CI/CD Integration Example

#!/bin/bash
EXIT_CODE=$(hyperroute push --env production \
  --name products \
  --schema dist/schema.graphql \
  --url http://products:4001/graphql \
  --json; echo $?)

case $EXIT_CODE in
  0)  echo "✅ Deployed successfully" ;;
  10) echo "⏳ Awaiting approval — check Platform UI" ;;
  11) echo "❌ Rejected" && exit 1 ;;
  12) echo "❌ Policy violation" && exit 1 ;;
  *)  echo "❌ Error (code $EXIT_CODE)" && exit 1 ;;
esac