docs(router): multiple Hive CDN endpoints (#7833)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Arda TANRIKULU 2026-03-16 15:57:12 +03:00 committed by GitHub
parent b908773ce0
commit fdf7586ea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 40 additions and 1 deletions

View file

@ -22,7 +22,7 @@ Load the Supergraph schema from [Hive Console](../../schema-registry) CDN.
### `endpoint`
- **Type:** `string`
- **Type:** `string` or `string[]`
- **Required:** Yes
- **Environment Variable:** `HIVE_CDN_ENDPOINT`
@ -36,6 +36,32 @@ supergraph:
# ...
```
#### Multiple endpoints
You can provide multiple endpoints as an array of strings. This allows the router to use fallback
endpoints in case of a possible unavailability of the main CDN endpoint. The order matters; the
router will always try to fetch the supergraph from the first endpoint, and if it fails, it will
move on to the next one.
```yaml {3} filename="router.config.yaml"
supergraph:
source: hive
endpoint:
- https://cdn.graphql-hive.com/artifacts/v1/... # Main CDN endpoint
- https://cdn-mirror.graphql-hive.com/artifacts/v1/... # Fallback CDN endpoint
# ...
```
If you provide the endpoints using `HIVE_CDN_ENDPOINT` environment variable, separate them with a
comma:
```bash
HIVE_CDN_ENDPOINT=https://cdn.graphql-hive.com/artifacts/v1/...,https://cdn-mirror.graphql-hive.com/artifacts/v1/...
```
> Learn more about
> [CDN Mirrors in Hive Console](../../schema-registry/high-availability-cdn#cdn-mirrors).
### `key`
- **Type:** `string`

View file

@ -55,6 +55,19 @@ supergraph:
poll_interval: 60s
```
You can also provide fallback endpoints from `cdn-mirror-graphql-hive.com` in case of a possible
unavailability of the main CDN endpoints, as shown below:
```yaml {3-5} filename="router.config.yaml"
supergraph:
source: hive
endpoint:
- https://cdn.graphql-hive.com/artifacts/v1/... # Use your Hive CDN endpoint here
- https://cdn-mirror.graphql-hive.com/artifacts/v1/... # Use your Hive CDN mirror endpoint here
key: hvABCD # Use your Hive CDN API key here
poll_interval: 60s
```
For additional configuration options, refer to the
[`supergraph` API reference page](./configuration/supergraph).