Hive Router's request selected supergraphs and other goodies#149
Open
enisdenjo wants to merge 1 commit into
Open
Hive Router's request selected supergraphs and other goodies#149enisdenjo wants to merge 1 commit into
enisdenjo wants to merge 1 commit into
Conversation
|
5 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Hive Router documentation to cover request-local supergraph selection via plugins, clarify readiness/liveness probe behavior in plugin mode, and rename/describe “schema reload” behavior as “supergraph retirement” (especially for subscriptions).
Changes:
- Documented selecting a per-request supergraph from
on_http_request, includingsupergraph.source: pluginbehavior and retirement semantics. - Updated probes docs to explain how health/readiness interact with plugins/coprocessors and added a Prometheus endpoint note.
- Clarified subscription behavior when a supergraph retires, including differences between configured reload vs plugin-owned supergraphs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/documentation/content/docs/router/supergraph.mdx | Adds “From a plugin” supergraph loading guidance and details retirement/reload semantics. |
| packages/documentation/content/docs/router/subscriptions/index.mdx | Renames “Schema Reload” to “Supergraph Retirement” and clarifies when subscriptions are terminated. |
| packages/documentation/content/docs/router/observability/probes.mdx | Clarifies health/readiness request behavior through plugins and adds Prometheus bypass note. |
| packages/documentation/content/docs/router/customizations/plugin-system/hooks.mdx | Adds guidance + example for selecting a supergraph in on_http_request and clarifies hook semantics. |
| packages/documentation/content/docs/router/configuration/supergraph.mdx | Documents supergraph.source: plugin mode and the operational consequences (readiness/GraphQL/WebSocket). |
Comments suppressed due to low confidence (2)
packages/documentation/content/docs/router/customizations/plugin-system/hooks.mdx:227
- The example selects the
basicschema variant whenever thex-schema-variantheader is present, but the text below says it overrides only whenx-schema-variant: basicis present. This inconsistency is confusing for copy/paste and makes the example behave differently than described.
if payload.router_http_request.headers().get("x-schema-variant").is_some() {
payload.set_supergraph(self.basic.clone());
}
packages/documentation/content/docs/router/customizations/plugin-system/hooks.mdx:197
StartHookPayloadis imported in the snippet but never used. Removing it makes the example compile cleanly when copied into a plugin.
plugin_trait::{RouterPlugin, StartHookPayload},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| ``` | ||
|
|
||
| **Select a supergraph for the request** |
| deduplication all use the same supergraph instance. | ||
|
|
||
| The plugin owns how long a supergraph remains selectable. Dropping its final `Arc<Supergraph>` | ||
| retires it: new requests can no longer select that owner, ordinary in-flight requests finish, and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
on_http_requestsupergraph.source: plugin- schema reload+ supergraph retirement