Skip to Content

supergraph

The supergraph configuration tells the router where to find your federated supergraph schema. This schema is the blueprint of your entire federated graph - it contains information about all your subgraphs and how they connect together.

For additional information about the supergraph loading and reloading process in Hive Router, see Supergraph page.

Hive Console

source

  • Type: string
  • Value: "hive"

Load the Supergraph schema from Hive Console CDN.

endpoint

  • Type: string
  • Required: Yes
  • Environment Variable: HIVE_CDN_ENDPOINT

The Hive CDN Endpoint of your target.

router.config.yaml
supergraph: source: hive endpoint: https://cdn.graphql-hive.com/artifacts/v1/... # ...

key

  • Type: string
  • Required: Yes
  • Environment Variable: HIVE_CDN_KEY

The Hive CDN key/token of your target.

router.config.yaml
supergraph: source: hive # ... key: hvABCD

poll_interval

  • Type: string
  • Required: No
  • Default: 10s
  • Environment Variable: HIVE_CDN_POLL_INTERVAL

A human-readable string representing the interval at which the router should poll Hive CDN for changes.

router.config.yaml
supergraph: source: hive # ... poll_interval: 10s

request_timeout

  • Type: string
  • Required: No
  • Default: 60s

A human-readable string representing the request timeout for Hive CDN requests.

router.config.yaml
supergraph: source: hive # ... request_timeout: 60s

connect_timeout

  • Type: string
  • Required: No
  • Default: 10s

A human-readable string representing the connection timeout for Hive CDN requests.

router.config.yaml
supergraph: source: hive # ... connect_timeout: 10s

retry_policy

  • Type: { max_retries: number }
  • Required: No
  • Default: { max_retries: 10 }

Max retries amount for Hive CDN requests. Exponential backoff is used to calculate the delay between retries.

router.config.yaml
supergraph: source: hive # ... retry_policy: max_retries: 10

accept_invalid_certs

  • Type: boolean
  • Required: No
  • Default: false

If set to true, allows accepting invalid TLS certificates when connecting to Hive CDN. Useful for development or testing environments.

router.config.yaml
supergraph: source: hive # ... accept_invalid_certs: false

Filesystem

The most straightforward way to provide your supergraph schema is as a local file. This works well for development and production deployments where you manage the schema file directly.

source

  • Type: string
  • Value: "file"

Load the schema from a local file.

path

  • Type: string
  • Required: Yes
  • Environment Variable: SUPERGRAPH_FILE_PATH

Path to your supergraph schema file. Can be absolute or relative to where you’re running the router.

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

This loads the schema from a file called supergraph.graphql in the same directory as your config file.

poll_interval

  • Type: string
  • Required: No
  • Default: disabled

A human-readable string representing the interval at which the router should poll the file for changes.

The reloading process depends on the file system’s ability to detect changes based on the file-system metadata (modified-at attribute).

router.config.yaml
supergraph: source: file path: ./supergraph.graphql poll_interval: 10s
Last updated on