Skip to content

Commit

Permalink
[Gateway] Mention default polling interval in the docs (#6144)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan authored Dec 19, 2024
1 parent 53e0a20 commit ea88816
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
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

0 comments on commit ea88816

Please sign in to comment.