Skip to content

Add a Hive Gateway compatible schema fetcher function based on hive:dev - #8463

Open
jdolle wants to merge 4 commits into
mainfrom
hive-dev-fetcher-fn
Open

Add a Hive Gateway compatible schema fetcher function based on hive:dev#8463
jdolle wants to merge 4 commits into
mainfrom
hive-dev-fetcher-fn

Conversation

@jdolle

@jdolle jdolle commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Background

Currently, to automatically run a local gateway to test a local schema requires:

  1. starting the subgraph in a way that exports the schema
  2. running hive:dev to watch this exported file and compose it into a supergraph file
  3. start hive gateway pointed at a local supergraph file

This requires knowledge about where all of these files exist and hive:dev feels like an unnecessary extra process that is slowing things down.

Description

This change creates a @graphql-hive/gateway compatible schema fetcher that is based on hive:dev. You can then configure the local subgraphs in the gateway and use an environment variable or another conditional to enabled this schema fetcher.

Checklist

  • Input validation
  • Error handling and logging
  • Testing

@jdolle jdolle self-assigned this Sep 10, 2026
@theguild-bot

theguild-bot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/apollo 0.48.8-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎
@graphql-hive/cli 0.63.3-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎
@graphql-hive/core 0.23.0-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎
@graphql-hive/envelop 0.40.13-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-plugin-console-sdk 0.1.7-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎
@graphql-hive/yoga 0.49.7-alpha-20260910214706-54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75 npm ↗︎ unpkg ↗︎

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.14.0-alpha-54ac3f3, 54ac3f3, 54ac3f3b7bbd1cc0e7a7c4ee7ca116256d0b9d75

@jdolle
jdolle requested review from enisdenjo and n1ru4l September 10, 2026 05:43
target = result.data;
}

const config: UnifiedGraphConfig = async ({ log, fetch: gatewayFetch, cwd, cache }) => {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache is a KeyValueCache<any> | undefined but I'm not sure when this cache is or isnt provided. Any clarity on this is appreciated.

@n1ru4l n1ru4l left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this belongs into the CLI package. Why not put this directly into the gateway or the gateway sdk package?

@jdolle
jdolle force-pushed the hive-dev-fetcher-fn branch from 373725e to a462163 Compare September 10, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants