Skip to content

feat(codegen): emit body schema for graphql complex inputs#81

Merged
samzong merged 1 commit into
mainfrom
feat/graphql-body-schema-required
Jul 1, 2026
Merged

feat(codegen): emit body schema for graphql complex inputs#81
samzong merged 1 commit into
mainfrom
feat/graphql-body-schema-required

Conversation

@samzong

@samzong samzong commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What's changed?

  • GraphQL codegen no longer fails closed on required complex input fields; it emits a variables request-body schema so agents can supply nested values via --set or --file.
  • Propagate JSON Schema required through OpenAPI 3 / Swagger backends, normalization, render, and runtime SchemaSpec.
  • Bump runtime schema version to 8 and catalog schema version to 9.
  • Update README and CLI usage docs to describe the new body-schema behavior.

Why

  • Required nested GraphQL inputs (e.g. input.members: [MemberInput!]!) blocked codegen entirely, leaving no machine-readable contract for agents to complete the request body.
  • Publishing body schema metadata preserves the agent inspectability loop (commands show, commands schema) while keeping scalar leaf fields as dotted CLI flags.

Verification

go test ./internal/codegen/... ./pkg/runtime/...

Replace fail-closed codegen for required complex GraphQL input fields with
request body schema metadata so agents can supply values via --set or --file.
Propagate schema Required through OpenAPI/Swagger backends, normalization,
rendering, and runtime catalog (schema version bump).

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong samzong merged commit bd0de2e into main Jul 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant