mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Revise Hive client configuration documentation (#7520)
This commit is contained in:
parent
8bbbfb8aa6
commit
131a92802d
1 changed files with 32 additions and 3 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue