diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs index c5585909241..9ee95b152ea 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs @@ -169,8 +169,6 @@ public async Task Download_GraphQL_SDL_Disabled() HttpResponseMessage response = await server.CreateClient().SendAsync(request); // assert - Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); - var result = await response.Content.ReadAsStringAsync(); - result.MatchSnapshot(); + Assert.Equal(HttpStatusCode.Moved, response.StatusCode); } } diff --git a/src/HotChocolate/Core/src/Execution/Serialization/JsonQueryResultSerializer.cs b/src/HotChocolate/Core/src/Execution/Serialization/JsonQueryResultSerializer.cs index 0bb331ffbfe..09874979580 100644 --- a/src/HotChocolate/Core/src/Execution/Serialization/JsonQueryResultSerializer.cs +++ b/src/HotChocolate/Core/src/Execution/Serialization/JsonQueryResultSerializer.cs @@ -103,9 +103,6 @@ private async Task SerializeInternalAsync( Stream outputStream, CancellationToken cancellationToken = default) { - await using var writer = new Utf8JsonWriter(outputStream, _options); - - WriteResult(writer, result); using var buffer = new ArrayWriter(); SerializeInternal(result, buffer); @@ -119,7 +116,6 @@ await outputStream .ConfigureAwait(false); #endif - await writer.FlushAsync(cancellationToken).ConfigureAwait(false); await outputStream.FlushAsync(cancellationToken).ConfigureAwait(false); }