From ea8881629eccb7c2610d7f2de906ccb83489ce17 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Thu, 19 Dec 2024 08:28:32 -0500 Subject: [PATCH] [Gateway] Mention default polling interval in the docs (#6144) --- packages/services/storage/src/tokens.ts | 2 +- .../pages/docs/gateway/supergraph-proxy-source.mdx | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/services/storage/src/tokens.ts b/packages/services/storage/src/tokens.ts index 8f11c546c..28d0fa117 100644 --- a/packages/services/storage/src/tokens.ts +++ b/packages/services/storage/src/tokens.ts @@ -89,7 +89,7 @@ export async function createTokenStorage( )}) RETURNING * `, - ) + ); return transformToken(row); }, diff --git a/packages/web/docs/src/pages/docs/gateway/supergraph-proxy-source.mdx b/packages/web/docs/src/pages/docs/gateway/supergraph-proxy-source.mdx index 130411d83..8645eb4c1 100644 --- a/packages/web/docs/src/pages/docs/gateway/supergraph-proxy-source.mdx +++ b/packages/web/docs/src/pages/docs/gateway/supergraph-proxy-source.mdx @@ -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 }) ``` + +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) + + + ## Proxy Instead of serving a supergraph, you can also use Hive Gateway to proxy any existing GraphQL API.