Repository navigation
Add TypeScript AppHost support to Fusion Aspire - #10197
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Fusion Aspire to better support polyglot (.NET + TypeScript) Aspire AppHosts by exporting the relevant extension methods for SDK generation, renaming the main composition entry points to “Nitro” terminology, and restructuring the Fusion documentation around a new “Local Development” guide (including redirects and migration guidance).
Changes:
- Introduces
AddNitroComposition/WithNitroComposition(with exported APIs) and updates tests to match. - Adds language-tab MDX components to present C# and TypeScript AppHost examples side-by-side.
- Replaces the old “Aspire Integration” doc with a new “Local Development” doc, updates references, and adds redirects + a 16.5→16.6 migration guide.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/src/components/LanguageTabs.tsx | New MDX helper to render C#/TypeScript content in tabs. |
| website/mdx-components.tsx | Registers LanguageTabs, CSharp, and TypeScript for MDX rendering. |
| website/nginx/conf.d/redirects.conf | Redirects old Fusion Aspire doc routes to local-development. |
| website/content/docs/fusion/structure.yaml | Replaces “Aspire Integration” nav entry with “Local Development”. |
| website/content/docs/fusion/migration/structure.yaml | Adds migration entry for v16.5 → v16.6. |
| website/content/docs/fusion/migration/migrate-from-16-5-to-16-6.md | New migration guide documenting API renames and behavioral changes. |
| website/content/docs/fusion/local-development.md | New primary doc for Aspire-based local development (C# + TypeScript). |
| website/content/docs/fusion/connectors/apollofederation.md | Updates references/snippets to WithNitroComposition and new doc link. |
| website/content/docs/fusion/composition.md | Updates links from removed Aspire page to local-development. |
| website/content/docs/fusion/cli.md | Updates link target from aspire-integration to local-development. |
| website/content/docs/fusion/aspire-integration.md | Removes deprecated Aspire Integration page. |
| website/content/blog/2026-05-15-fusion-16.md | Updates blog link to the new Local Development guide. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/NitroExtensions.cs | Adds exported AddNitroComposition and tightens WithNitroApiId constraints. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLResourceBuilderExtensions.cs | Adds exported WithNitroComposition + obsoletes old naming. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLOrchestratorExtensions.cs | Updates obsolete alias to point to AddNitroComposition. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/SchemaComposition.cs | Updates Nitro diagnostic messaging for new API name. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/Nitro/NitroSeedUpdateOptions.cs | Makes seed update options DTO-friendly ([AspireDto], init-only props). |
| src/HotChocolate/Fusion/src/Fusion.Aspire/Nitro/NitroCompositionOptions.cs | Allows replacing SeedUpdates (needed for options-object style APIs). |
| src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj | Enables Aspire analyzers and tags package for polyglot support. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/SchemaCompositionTests.cs | Renames tests and call sites to WithNitroComposition. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/NitroExtensionsTests.cs | Updates tests for AddNitroComposition behavior and new argument validation. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/Nitro/NitroSchemaCompositionTests.cs | Updates snapshot expectations for new diagnostics text. |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/CompositionHarness.cs | Updates harness to use init-only NitroSeedUpdateOptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CreateGatewayLogger(resource).LogWarning( | ||
| "The resource {ResourceName} selects the Nitro api {ApiId}, but the " | ||
| + "distributed application does not add Nitro. Call AddNitro on the " | ||
| + "distributed application builder so the api id takes effect.", | ||
| + "distributed application does not add Nitro. Call AddNitroComposition on " | ||
| + "the distributed application builder so the api id takes effect.", |
Patch coverage97.6% of changed lines covered (41/42)
Uncovered changed lines (JSON){
"sha": "0d51bbfb0c52443311df34a64791707c2ce5c2d2",
"files": [
{ "path": "src/HotChocolate/Fusion/src/Fusion.Aspire/GraphQLResourceBuilderExtensions.cs", "ranges": [[178, 178]] }
]
}Project coverage: 54.4% (242338/445619 lines) |
Co-authored-by: michaelstaib <9714350+michaelstaib@users.noreply.github.com>
|
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
No description provided.