Skip to content

Commit 54df27c

Browse files
authored
Fix hook to get the schema endpoints from aspire (#8971)
1 parent 6285e84 commit 54df27c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/HotChocolate/Fusion-vnext/src/Fusion.Aspire/SchemaComposition.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Aspire.Hosting.ApplicationModel;
55
using Aspire.Hosting.Eventing;
66
using Aspire.Hosting.Lifecycle;
7+
using Microsoft.Extensions.DependencyInjection;
78
using Microsoft.Extensions.Hosting;
89
using Microsoft.Extensions.Logging;
910

@@ -19,9 +20,9 @@ public Task SubscribeAsync(
1920
DistributedApplicationExecutionContext executionContext,
2021
CancellationToken cancellationToken)
2122
{
22-
eventing.Subscribe<BeforeStartEvent>(async (@event, ct) =>
23+
eventing.Subscribe<AfterResourcesCreatedEvent>(async (@event, ct) =>
2324
{
24-
var model = @event.Model;
25+
var model = @event.Services.GetRequiredService<DistributedApplicationModel>();
2526
var compositionFailed = false;
2627

2728
try

0 commit comments

Comments
 (0)