Skip to content

SP6: rebuild Apollo Federation v2 (v3 north star) #203

Description

@rawkode

Background

TNQ-3 surfaced that docs/v3-decisions.md and docs/spec-gap-analysis.md declared opposite north stars for GraphQL. Escalated to @rawkode; resolution: rebuild federation per the spec. Current kernel-owned-GraphQL is the interim shape and stays as the shipping contract for kernel-mandatory fields (auth / identity / instance config).

Docs alignment landed in #202.

Scope

Implement spec §A7 — Apollo Federation v2 — per docs/spec-gap-analysis.md. High-level shape:

  1. Spec → plan cycle of its own (matches the existing spec-driven flow). Includes a build-time spike:
    • planner-as-crate (Hive Router embeddable shape)
    • plan-IR-drives-executor (custom plan executor sees the planner's IR, not a serialized query)
    • join-spec dialect compatibility (which subset of Apollo's join-spec we emit and consume)
  2. WIT contract additions
    • graphql-resolve host export so each extension can answer subgraph queries
    • Manifest field for the extension's subgraph SDL
  3. Composition + planning at runtime
    • graphql-composition (Grafbase) for SDL composition
    • Hive Router as query planner
    • Custom WASM plan executor that drives the planner's plan into per-extension graphql-resolve calls (no apollo-federation/harmonizer at runtime, per spec)
  4. Migration of kernel-owned GraphQL fields that are extension-owned in the federated world (per-extension subgraphs absorb their concerns; kernel keeps the small set it must own)
  5. First-party extension subgraph rollout (issues, epics, pull-requests, checks, docs, workspace-home) — each extension ships SDL + handles its graphql-resolve
  6. Documentation rewriteGOAL.md and SPEC.md updated end-to-end (initial alignment in docs: align north star on SP6 Apollo Federation v2 rebuild (TNQ-3 P1) #202 is a placeholder; the full rewrite happens with SP6 build)
  7. Test coverage — composition tests, planner tests, executor tests, per-extension subgraph tests, end-to-end federated query tests

Out of scope (separate work items)

  • SSH transport (spec §A9 §SP2) — already tracked
  • Argon2 PATs / admin-repo identity model (spec §A5) — already tracked
  • Per-extension libSQL migration (spec §A3) — separate decision

References

  • spec-gap-analysis.md §A7 — chosen design
  • v3-decisions.md — current shape vs north star
  • docs/wit-platform-design.md — WIT host import shape
  • GOAL.md, SPEC.md — current allowances for kernel-owned fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions