Skip to content

Commit

Permalink
fix: resolve unitofwork from correct key
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarendorff2 committed Oct 4, 2024
1 parent 1c96892 commit 7cd6d0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Fluss.HotChocolate/AddExtensionMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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),

Check warning on line 41 in src/Fluss.HotChocolate/AddExtensionMiddleware.cs

View check run for this annotation

Codecov / codecov/patch

src/Fluss.HotChocolate/AddExtensionMiddleware.cs#L41

Added line #L41 was not covered by tests
unitOfWork).Create();
}

Expand Down Expand Up @@ -84,7 +84,7 @@ private async IAsyncEnumerable<IQueryResult> LiveResults(IReadOnlyDictionary<str

while (true)
{
if (contextData == null || !contextData.TryGetValue(nameof(UnitOfWork), out var value))
if (contextData == null || !contextData.TryGetValue(nameof(IUnitOfWork), out var value))
{
break;
}
Expand Down

0 comments on commit 7cd6d0c

Please sign in to comment.