Revise Hive client configuration documentation (#7520)

This commit is contained in:
Laurin Quast 2026-01-20 21:05:36 +01:00 committed by GitHub
parent 8bbbfb8aa6
commit 131a92802d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,10 +7,39 @@ connect to a local Hive server, you need to configure both the client and SDK.
## Configuring the Client
Instantiate your Hive client with the `selfHosting` option.
Instantiate your Gateway or client to point to the self-hosting endpoints.
<Tabs items={['Custom', 'GraphQL Yoga', 'Apollo Server', 'Envelop']}>
<Tabs.Tab>
<Tabs items={['Hive Gateway', 'Hive Router', 'Hive JS SDK', 'GraphQL Yoga', 'Apollo Server', 'Envelop']}>
<Tabs.Tab>
```ts filename="gateway.config.ts"
import { defineConfig } from '@graphql-hive/gateway'
const config = defineConfig({
reporting: {
type: 'hive',
selfHosting: {
graphqlEndpoint: 'http://localhost:8082/graphql',
usageEndpoint: 'http://localhost:8081',
applicationUrl: 'http://localhost:8080/'
}
}
})
```
</Tabs.Tab>
<Tabs.Tab>
```yml filename="router.config.yml"
usage_reporting:
endpoint: http://localhost:8081
```
</Tabs.Tab>
<Tabs.Tab>
```ts filename="custom.ts"
import { createHive } from '@graphql-hive/core'