[Gateway] Mention default polling interval in the docs (#6144)

This commit is contained in:
Arda TANRIKULU 2024-12-19 08:28:32 -05:00 committed by GitHub
parent 53e0a20ac6
commit ea8881629e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View file

@ -89,7 +89,7 @@ export async function createTokenStorage(
)})
RETURNING *
`,
)
);
return transformToken(row);
},

View file

@ -2,7 +2,7 @@
title: 'Gateway: Supergraph schema'
---
import { Tabs } from '@theguild/components'
import { Callout, Tabs } from '@theguild/components'
# Supergraph / Proxy Source
@ -212,11 +212,21 @@ export const gatewayConfig = defineConfig({
supergraph: {
/* Supergraph Configuration */
},
// Poll the schema registry every 10 seconds
// By default it polls the schema registry every 10 seconds
pollingInterval: 10_000
})
```
<Callout>
If you use a source like Hive CDN or a custom URL as a source for the supergraph schema,
CLI will automatically poll the source for changes and update the schema accordingly with 10 seconds interval.
If you want to change this behavior by setting the `--polling=10s` flag or `pollingInterval` in the configuration file.
[Learn more about the configuration file](/docs/api-reference/gateway-config)
[Learn more about the CLI flags](/docs/api-reference/gateway-cli)
</Callout>
## Proxy
Instead of serving a supergraph, you can also use Hive Gateway to proxy any existing GraphQL API.