Upgrade Hot Chocolate to 16.6.4 - #3803
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The upgrade-related API adjustments and default-value semantics are implemented consistently and are backed by expanded regression coverage for the affected schema/input behaviors.
Pull request overview
This PR upgrades the repository’s centrally managed Hot Chocolate dependencies from 16.0.0 to 16.6.4 and applies the necessary compatibility adjustments so GraphQL schema generation and input-default semantics remain consistent across relational providers and Cosmos.
Changes:
- Bumps the six centrally managed Hot Chocolate packages to 16.6.4.
- Updates create-input generation to avoid treating SQL default expressions as GraphQL input defaults while preserving Cosmos literal defaults.
- Adds/strengthens regression tests around create-input defaults (omission vs explicit null, required fields, and linking/multi-create), and updates a unit test to use the non-obsolete
FragmentSpreadNodeconstructor.
File summaries
| File | Description |
|---|---|
src/Directory.Packages.props |
Updates centrally managed Hot Chocolate package versions to 16.6.4. |
src/Service.GraphQLBuilder/Mutations/CreateMutationBuilder.cs |
Passes DatabaseType into scalar-input generation and suppresses GraphQL defaults for relational DB default expressions. |
src/Service.Tests/GraphQLBuilder/MutationBuilderTests.cs |
Adds executable-schema regression tests for SQL default-expression handling and strengthens Cosmos default-value behavior assertions. |
src/Service.Tests/UnitTests/SqlQueryStructureHelperTests.cs |
Replaces obsolete FragmentSpreadNode constructor usage with the newer overload including empty arguments. |
docs/design/HC16-upgrade.md |
Documents the 16.6.4 follow-up and the default-value compatibility rationale/semantics. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
@microsoft-github-policy-service agree [company="Microsoft"] |
@microsoft-github-policy-service agree company="Microsoft" |
Summary
Upgrade all six centrally managed Hot Chocolate packages from 16.0.0 to 16.6.4.
Because this crosses minor versions, the upgrade also requires two compatibility adjustments: handling relational create-input defaults correctly and replacing an obsolete fragment-spread constructor.
File-by-file changes
src\Directory.Packages.propssrc\Service.GraphQLBuilder\Mutations\CreateMutationBuilder.cs((1))and(getdate())can fail the upgraded library's input-default validation. Defaulted SQL fields remain optional so the database evaluates omitted values; Cosmos literal defaults are preserved.src\Service.Tests\GraphQLBuilder\MutationBuilderTests.cssrc\Service.Tests\UnitTests\SqlQueryStructureHelperTests.csFragmentSpreadNodeconstructor with the overload accepting an explicit empty arguments collection. This avoids an obsolete-API warning becoming a build error while preserving the original test behavior.docs\design\HC16-upgrade.mdBehavior preserved