Conversation
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.48.8-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.63.3-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.23.0-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.13-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-plugin-console-sdk |
0.1.7-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.49.7-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
hive |
11.14.0-alpha-20260914224503-69a7393911c35547d78f9d746dc1b7e9c94c2b39 |
npm ↗︎ unpkg ↗︎ |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
| target = result.data; | ||
| } | ||
|
|
||
| const config: UnifiedGraphConfig = async ({ log, fetch: gatewayFetch, cwd, cache }) => { |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
I don't think this belongs into the CLI package. Why not put this directly into the gateway or the gateway sdk package?
373725e to
a462163
Compare
| import { readFile } from 'node:fs/promises'; | ||
| import { resolve as resolvePath } from 'node:path'; |
There was a problem hiding this comment.
This will potentially break non node.js runtime compatibility. Worth checking - I would recommend placing this utility in the gateway package in that case.
There was a problem hiding this comment.
It absolutely did break this.
I addressed the issue by forcing a dynamic important adding a safety check to verify if running in a node environment.
I prefer the fetcher living here since it shares code with hive dev and we have precedent for defining loaders in separate repos. We already expose the CDN fetcher from this repo.
Background
Currently, to automatically run a local gateway to test a local schema requires:
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/gatewaycompatible schema fetcher that is based onhive: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