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
The Hive CDN Endpoint of your target.
supergraph:
source: hive
endpoint: https://cdn.graphql-hive.com/artifacts/v1/...
# ...key
- Type:
string - Required: Yes
The Hive CDN key/token of your target.
supergraph:
source: hive
# ...
key: hvABCDpoll_interval
- Type:
string - Required: No
- Default:
10s
A human-readable string representing the interval at which the router should poll Hive CDN for changes.
supergraph:
source: hive
# ...
poll_interval: 10stimeout
- Type:
string - Required: No
- Default:
60s
A human-readable string representing the timeout for Hive CDN requests.
supergraph:
source: hive
# ...
timeout: 60sretry_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.
supergraph:
source: hive
# ...
retry_policy:
max_retries: 10Filesystem
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
Path to your supergraph schema file. Can be absolute or relative to where you’re running the router.
supergraph:
source: file
path: ./supergraph.graphqlThis 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).
supergraph:
source: file
path: ./supergraph.graphql
poll_interval: 10s