mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
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:
parent
b908773ce0
commit
fdf7586ea1
2 changed files with 40 additions and 1 deletions
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue