Skip to Content
DocumentationHive ConsoleSelf-HostingClient & CLI Configuration

Client & CLI Configuration

By default, the Hive CLI and Hive Client SDK connect to the hosted Hive Console version. In order to connect to a local Hive server, you need to configure both the client and SDK.

Configuring the Client

Instantiate your Gateway or client to point to the self-hosting endpoints.

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/' } } })

Configuring the CLI

Place a hive.json file within the root of your project.

hive.json
{ "registry": { "endpoint": "http://localhost:8082/graphql" } }
Last updated on