Repository navigation
Add GraphQL spec version serialization options - #10407
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public formatter contract is source/binary breaking, and the new Core test project is absent from the Core area solution.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds GraphQL specification-version serialization for schema exports, HTTP SDL endpoints, and CLI output.
Changes:
- Adds October 2021 and September 2025 SDL rewriting.
- Adds HTTP query and CLI options with validation.
- Adds formatter, endpoint, CLI, and GraphQL.js conformance tests.
File summaries
| File | Description |
|---|---|
website/content/docs/hotchocolate/server/endpoints.md |
Documents HTTP spec-version queries. |
website/content/docs/hotchocolate/server/command-line.md |
Documents CLI export options. |
src/HotChocolate/Primitives/src/Primitives/ErrorCodes.cs |
Adds invalid-version error code. |
src/HotChocolate/Core/src/Types.Abstractions/Serialization/* |
Implements version profiles and SDL rewriting. |
src/HotChocolate/Core/src/Types/Execution/Internal/SchemaFileExporter.cs |
Applies spec-version formatting to exports. |
src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/* |
Adds versioned endpoint responses and caching. |
src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/* |
Adds CLI option and export handling. |
src/HotChocolate/AspNetCore/src/AspNetCore/Warmup/SchemaFileExporterWarmupTask.cs |
Preserves native warmup exports. |
src/HotChocolate/AspNetCore/test/AspNetCore.Tests/* |
Tests HTTP behavior and snapshots. |
src/HotChocolate/AspNetCore/test/AspNetCore.CommandLine.Tests/* |
Tests CLI behavior and snapshots. |
src/HotChocolate/Core/test/Types.Abstractions.Tests/* |
Tests formatter and rewriter behavior. |
src/HotChocolate/Core/test/Types.SpecVersion.Tests/* |
Adds GraphQL.js conformance tests. |
src/HotChocolate/Core/test/Types.Tests/Execution/Internal/SchemaFileExporterTests.cs |
Tests versioned file exports. |
src/All.slnx |
Registers the new test project. |
Review details
Files not reviewed (2)
- src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Properties/AspNetCorePipelineResources.Designer.cs: Generated file
- src/HotChocolate/Core/test/Types.SpecVersion.Tests/node/package-lock.json: Generated file
- Files reviewed: 47/49 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The node container ran npm ci inside a bind-mounted host temp directory, so node_modules were owned by root on Linux runners and the fixture could not delete them in DisposeAsync. The node files and schemas are now copied into the container, so nothing is written to the host.
Contributor
Patch coverage86.5% of changed lines covered (495/572) Uncovered changed lines (JSON){
"sha": "7f89faa164819be7f5764c3a9c2410b42e626fc2",
"files": [
{ "path": "src/HotChocolate/AspNetCore/src/AspNetCore/Warmup/SchemaFileExporterWarmupTask.cs", "ranges": [[17, 17]] },
{ "path": "src/HotChocolate/Core/src/Types.Abstractions/Serialization/ThrowHelper.cs", "ranges": [[7, 7]] },
{ "path": "src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Formatters/IHttpResponseFormatter.cs", "ranges": [[163, 163]] },
{ "path": "src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Formatters/DefaultHttpResponseFormatter.cs", "ranges": [[493, 493], [496, 496], [520, 520], [536, 536], [539, 539], [1221, 1221]] },
{ "path": "src/HotChocolate/Core/src/Types.Abstractions/Serialization/SpecVersionSchemaRewriter.cs", "ranges": [[88, 88], [90, 90], [92, 92], [94, 94], [96, 96], [98, 98], [100, 100], [102, 102], [111, 113], [125, 127], [145, 153], [171, 179], [191, 193], [211, 219], [237, 245], [347, 353], [379, 381], [492, 492]] },
{ "path": "src/HotChocolate/Core/src/Types.Abstractions/Serialization/GraphQLSpecVersionProfile.cs", "ranges": [[81, 81], [83, 83], [95, 95]] },
{ "path": "src/HotChocolate/Core/src/Types.Abstractions/Serialization/GraphQLSpecVersions.cs", "ranges": [[57, 57]] }
]
}Project coverage: 58.9% (300424/510406 lines) |
This was referenced Oct 25, 2026
Merged
This was referenced Oct 26, 2026
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.
No description provided.