Other integrations

GraphQL Code Generator

GraphQL Code Generator is a tool that generates types from your GraphQL schema and operations. You can use High-Availability CDN to provide the schema.

Setting up the config

You can configure codegen to use the Schema from the CDN:

import { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
  schema: {
    "https://cdn.graphql-hive.com/artifacts/v1/TARGET_ID/sdl.graphql": {
      headers: {
        "X-Hive-CDN-Key": "CDN_ACCESS_TOKEN",
      },
    },
  },
  // Your existing config
};

On this page

View on GitHub