Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/services/storage/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function createTokenStorage(
)})
RETURNING *
`,
)
);

return transformToken(row);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Gateway: Supergraph schema'
---

import { Tabs } from '@theguild/components'
import { Callout, Tabs } from '@theguild/components'

# Supergraph / Proxy Source

Expand Down Expand Up @@ -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.
Expand Down
Loading