On this page

Envelop

Installation

npm i @graphql-hive/envelop

The @graphql-hive/envelop package exports an Envelop plugin, that can be used directly with any server that supports Envelop.

Configuration

A full configuration guide can be found in the “Configuration” page.

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

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 { useHive } from "@graphql-hive/envelop";
import { schema } from "./schema";

const plugin = useHive({
  enabled: true, // Enable/Disable Hive Client
  token: "YOUR-TOKEN",
  usage: {
    target: "<YOUR_ORGANIZATION>/<YOUR_PROJECT>/<YOUR_TARGET>",
  },
});

Additional Resources