Skip to content

[Initiative] Dynamic GraphQL Schema Synthesis and Stitching for Custom Kinds #149

@juliuskrah

Description

@juliuskrah

Summary

Add runtime GraphQL schema synthesis and stitching for CRD/custom kinds so the graph can evolve from registry definitions without static codegen-only releases.

Scope

In Scope

  • Watch resource definition/registry changes and trigger schema refresh
  • Synthesize GraphQL types and root fields from registered kind schemas
  • Support namespaced root query conventions for generated kinds
  • Stitch extension-provided GraphQL sub-schemas into the main graph with conflict handling
  • Add schema-version lifecycle (build, publish, rollback) and cache invalidation hooks
  • Add tests for type generation, schema stitching conflicts, and resolver wiring

Out of Scope

  • Full extension marketplace workflows
  • Replacing existing static schema paths for already-stable core types in phase 1
  • Query handler internals (tracked separately)

Acceptance Criteria

  • New/updated kind definitions can produce corresponding GraphQL types at runtime
  • Generated types are queryable from the main graph without service restart (or with defined bounded reload)
  • Extension sub-schemas can be stitched with deterministic conflict resolution
  • Schema refresh is observable (version, timestamp, result, failure reason)
  • Failure in schema synthesis does not crash the API process; last good schema remains active
  • Integration tests cover registry update -> schema refresh -> successful query path

Implementation Notes

Dynamic schema generation is required for CRD-style extensibility. The critical design point is safe schema lifecycle management: build candidate schema, validate, then atomically publish. Stitching should prefer explicit namespace/prefix boundaries to avoid field collisions across extensions.

Dependencies

Tracking

  • Area: infra
  • Priority: p2 – high
  • Target Milestone / Release: TBD

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions