Fix Fusion Aspire validation and resource commands - #10177
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Fusion Aspire’s Nitro integration so schema validation happens automatically for Nitro-composed gateways (with an explicit opt-out), and fixes resource command execution to consistently target the logical resource name (not a runtime instance name).
Changes:
- Enable automatic Nitro schema validation when Nitro is configured and a gateway has a Nitro API id, with a new
GraphQLCompositionSettings.DisableSchemaValidationopt-out. - Ensure “recompose” and Nitro auto-update commands execute against the logical resource name.
- Update tests to reflect the new validation behavior and the corrected command routing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/NitroExtensionsTests.cs | Removes legacy validation opt-in tests and adds command execution tests asserting logical resource naming. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/Nitro/NitroSchemaCompositionTests.cs | Updates validation tests to default-on behavior and adds coverage for the new disable flag. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/SchemaComposition.cs | Changes schema capture condition to drive automatic Nitro validation (and skip capture when disabled). |
| src/HotChocolate/Fusion/src/Fusion.Aspire/NitroExtensions.cs | Removes the explicit schema validation opt-in API and fixes command execution to use logical resource names. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/Nitro/NitroSchemaValidationCoordinator.cs | Aligns scheduling conditions with the new “automatic when Nitro is used” behavior. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/Nitro/NitroSchemaValidationAnnotation.cs | Deletes the no-longer-used annotation type. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLResourceBuilderExtensions.cs | Fixes “recompose” command to use logical resource name instead of context.ResourceName. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLCompositionSettings.cs | Adds DisableSchemaValidation setting to allow opting out of Nitro validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage100.0% of changed lines covered (9/9)
Project coverage: 54.3% (237180/437087 lines) |
This was referenced Aug 9, 2026
Merged
Open
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.