Envelop
Installation
npm i @graphql-hive/client
We recommend installing Hive Client package as a direct dependency of your project, because it includes a runtime to send usage reports and schemas to Hive registry.
The @graphql-hive/client
package exports an
Envelop plugin (opens in a new tab), that can be used directly with any server
that supports Envelop.
Integration Guide
Publishing Schemas
Please use the Hive CLI to publish your GraphQL schema. Follow the CI/CD instructions for automating the process.
Usage Reporting
💡
For more configuration options, such as sampling, client name and version reporting, please refer to the Hive client configuration reference.
You can send usage reporting to Hive registry by using the usage
section of the configuration:
import { createServer } from 'node:http'
import { createYoga } from 'graphql-yoga'
import { schema } from './schema'
const plugin = useHive({
enabled: true, // Enable/Disable Hive Client
token: 'YOUR-TOKEN',
usage: true
})