Repository navigation
Add WithGraphQLHttpEndpoint and require declared routes for Aspire composition - #10196
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Fusion composition to carry per-schema local URL overrides via a new LocalSourceSchema type, introduces WithGraphQLHttpEndpoint for Aspire resources, and makes Aspire schema composition require an explicitly declared GraphQL route (so schema download and URL override injection can be deterministic).
Changes:
- Introduces
WithGraphQLHttpEndpoint(and obsoletes older file/schema-endpoint APIs) and updates Aspire composition to require declared GraphQL routes and schema paths. - Replaces tuple-based source schema plumbing with
LocalSourceSchema(schema + settings + optional URL override) across Nitro CLI and Fusion composition helpers. - Simplifies settings composition URL resolution by removing
SettingsComposerOptionsand passing expliciturlOverrides+preferDevUrlsinputs.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/LegacyFusionArchiveMigrator.cs | Migrates legacy archive schemas into LocalSourceSchema containers. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishHelpers.cs | Updates publish/composition flow to use LocalSourceSchema and new compose signature. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs | Switches downloaded source schemas to LocalSourceSchema. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionCompositionHelpers.cs | Returns/handles LocalSourceSchema dictionaries and disposes settings via .Settings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs | Adapts settings ownership tracking and compose invocation to new API. |
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SettingsComposerUrlResolutionTests.cs | Updates tests for new SettingsComposer inputs and adds URL override edge cases. |
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/LocalSourceSchemaTests.cs | Adds constructor validation test for relative URL overrides. |
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/GatewaySettingsComposerTests.cs | Updates composer invocation to pass overrides + preferDevUrls. |
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/CompositionHelperTests.cs | Updates composition helper tests to use LocalSourceSchema and new compose signature. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/SchemaEndpointServer.cs | Adds a real Kestrel-backed schema endpoint test helper for endpoint composition tests. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/SchemaCompositionTests.cs | Updates Aspire tests to new endpoint API; adds coverage around deprecated file-based API. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/Nitro/NitroSchemaCompositionTests.cs | Updates Nitro/Aspire harness tests to use endpoint-based schemas and running-state waits. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/GraphQLResourceBuilderExtensionsTests.cs | Adds tests for WithGraphQLHttpEndpoint defaults/validation and adjusts deprecated API expectations. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/CompositionHarness.cs | Adds a harness-specific SchemaComposition subclass to wait on resource state without an orchestrator. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/AspireCompositionHelperTests.cs | Replaces local URL override building with TryBuildLocalSourceSchemas and adds route-required failure tests. |
| src/HotChocolate/Fusion/src/Fusion.Composition/SettingsComposerOptions.cs | Removes options record in favor of explicit composer inputs. |
| src/HotChocolate/Fusion/src/Fusion.Composition/SettingsComposer.cs | Changes compose API to accept urlOverrides + preferDevUrls and removes external-environment logic. |
| src/HotChocolate/Fusion/src/Fusion.Composition/LocalSourceSchema.cs | Introduces LocalSourceSchema value type with optional absolute URL override. |
| src/HotChocolate/Fusion/src/Fusion.Composition/CompositionHelper.cs | Updates composition pipeline to accept LocalSourceSchema and pass derived URL overrides into settings composer. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/SourceSchemaInfo.cs | Carries the declared GraphQL route (GraphQLPath) through discovery/composition. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/SchemaEndpointConfiguration.cs | Removes implicit default path logic to require declared routes/paths. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/SchemaComposition.cs | Requires declared GraphQL paths; selects schema fetch path based on federation vs schema download path; makes wait overridable for tests. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLSourceSchemaAnnotation.cs | Adds GraphQLPath to annotations to distinguish route vs schema download path. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLResourceBuilderExtensions.cs | Adds WithGraphQLHttpEndpoint, obsoletes older APIs, and simplifies schema URL building. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/AspireCompositionHelper.cs | Builds LocalSourceSchema map (and fails when routes are missing) before composing archives. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+7
| using Microsoft.AspNetCore.Builder; | ||
| using Microsoft.AspNetCore.Hosting; | ||
| using Microsoft.AspNetCore.Http; |
Contributor
This was referenced Aug 6, 2026
Merged
This was referenced Aug 13, 2026
Closed
Closed
This was referenced Aug 26, 2026
Closed
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.