From 7cd6d0c958177719ebb28d7cc02f477b224a88e5 Mon Sep 17 00:00:00 2001 From: mvarendorff Date: Fri, 4 Oct 2024 11:24:29 +0200 Subject: [PATCH] fix: resolve unitofwork from correct key --- src/Fluss.HotChocolate/AddExtensionMiddleware.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Fluss.HotChocolate/AddExtensionMiddleware.cs b/src/Fluss.HotChocolate/AddExtensionMiddleware.cs index 484c70f..30eca4f 100644 --- a/src/Fluss.HotChocolate/AddExtensionMiddleware.cs +++ b/src/Fluss.HotChocolate/AddExtensionMiddleware.cs @@ -21,7 +21,7 @@ public async ValueTask InvokeAsync(IRequestContext context) { await _next.Invoke(context); - if (!context.ContextData.TryGetValue(nameof(UnitOfWork), out var unitOfWork)) + if (!context.ContextData.TryGetValue(nameof(IUnitOfWork), out var unitOfWork)) { return; } @@ -38,7 +38,7 @@ public async ValueTask InvokeAsync(IRequestContext context) { if (context.Result is QueryResult subsequentQueryResult) { - context.Result = QueryResultBuilder.FromResult(subsequentQueryResult).AddContextData(nameof(UnitOfWork), + context.Result = QueryResultBuilder.FromResult(subsequentQueryResult).AddContextData(nameof(IUnitOfWork), unitOfWork).Create(); } @@ -84,7 +84,7 @@ private async IAsyncEnumerable LiveResults(IReadOnlyDictionary