Skip to content

Hive Router's request selected supergraphs and other goodies#149

Open
enisdenjo wants to merge 1 commit into
mainfrom
big-supergraphs-witcher
Open

Hive Router's request selected supergraphs and other goodies#149
enisdenjo wants to merge 1 commit into
mainfrom
big-supergraphs-witcher

Conversation

@enisdenjo

Copy link
Copy Markdown
Member
  • mainly feat(router): request selected supergraphs router#1284
  • documented field renames and changes in the existing plugins
  • noted that prometheus skips on_http_request
  • emphasised how to pass readiness with supergraph.source: plugin
  • - schema reload + supergraph retirement
  • examples and links

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Copilot AI 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.

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, including supergraph.source: plugin behavior 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 basic schema variant whenever the x-schema-variant header is present, but the text below says it overrides only when x-schema-variant: basic is 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

  • StartHookPayload is 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waits for release Represents changes in a library that have not yet been released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants