Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions src/All.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@
<Project Path="HotChocolate/Core/src/Execution.Operation.Abstractions/HotChocolate.Execution.Operation.Abstractions.csproj" />
<Project Path="HotChocolate/Core/src/Execution.Pipeline/HotChocolate.Execution.Pipeline.csproj" />
<Project Path="HotChocolate/Core/src/Execution.Projections/HotChocolate.Execution.Projections.csproj" />
<Project Path="HotChocolate/Core/src/Execution/HotChocolate.Execution.csproj" />
<Project Path="HotChocolate/Core/src/Features/HotChocolate.Features.csproj" />
<Project Path="HotChocolate/Core/src/Fetching/HotChocolate.Fetching.csproj" />
<Project Path="HotChocolate/Core/src/Subscriptions.InMemory/HotChocolate.Subscriptions.InMemory.csproj" />
<Project Path="HotChocolate/Core/src/Subscriptions.Nats/HotChocolate.Subscriptions.Nats.csproj" />
<Project Path="HotChocolate/Core/src/Subscriptions.Postgres/HotChocolate.Subscriptions.Postgres.csproj" />
Expand All @@ -112,7 +110,6 @@
<Project Path="HotChocolate/Core/src/Types.Queries/HotChocolate.Types.Queries.csproj" />
<Project Path="HotChocolate/Core/src/Types.Scalars.Upload/HotChocolate.Types.Scalars.Upload.csproj" />
<Project Path="HotChocolate/Core/src/Types.Scalars/HotChocolate.Types.Scalars.csproj" />
<Project Path="HotChocolate/Core/src/Types.Shared/HotChocolate.Types.Shared.csproj" />
<Project Path="HotChocolate/Core/src/Types.Validation/HotChocolate.Types.Validation.csproj" />
<Project Path="HotChocolate/Core/src/Types/HotChocolate.Types.csproj" />
<Project Path="HotChocolate/Core/src/Validation/HotChocolate.Validation.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<ProjectReference Include="..\CookieCrumble\CookieCrumble.csproj" />
<ProjectReference Include="..\..\..\HotChocolate\AspNetCore\src\Transport.Abstractions\HotChocolate.Transport.Abstractions.csproj" />
<ProjectReference Include="..\..\..\HotChocolate\AspNetCore\src\Transport.Http\HotChocolate.Transport.Http.csproj" />
<ProjectReference Include="..\..\..\HotChocolate\Core\src\Execution\HotChocolate.Execution.csproj" />
<ProjectReference Include="..\..\..\HotChocolate\Core\src\Types\HotChocolate.Types.csproj" />
<ProjectReference Include="..\..\..\HotChocolate\Language\src\Language.SyntaxTree\HotChocolate.Language.SyntaxTree.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\src\Execution\HotChocolate.Execution.csproj" />
<ProjectReference Include="..\..\..\Core\src\Types\HotChocolate.Types.csproj" />
<ProjectReference Include="..\Adapters.Mcp.Core\HotChocolate.Adapters.Mcp.Core.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

using HotChocolate.Buffers;
#if FUSION
using System.Buffers;
using System.Net;
Expand Down Expand Up @@ -160,7 +162,7 @@ private async ValueTask<OperationResult> ReadAsResultInternalAsync(string? charS
#if FUSION
// we try and read the first chunk into a single chunk.
var reader = PipeReader.Create(stream, s_options);
var currentChunk = JsonMemory.Rent();
var currentChunk = JsonMemory.Rent(JsonMemoryKind.Json);
var currentChunkPosition = 0;
var chunkIndex = 0;
var chunks = ArrayPool<byte[]>.Shared.Rent(64);
Expand Down Expand Up @@ -215,7 +217,7 @@ private async ValueTask<OperationResult> ReadAsResultInternalAsync(string? charS
}

chunks[chunkIndex++] = currentChunk;
currentChunk = JsonMemory.Rent();
currentChunk = JsonMemory.Rent(JsonMemoryKind.Json);
currentChunkPosition = 0;
}
}
Expand Down Expand Up @@ -253,7 +255,7 @@ private async ValueTask<OperationResult> ReadAsResultInternalAsync(string? charS
}

chunks[chunkIndex++] = currentChunk;
currentChunk = JsonMemory.Rent();
currentChunk = JsonMemory.Rent(JsonMemoryKind.Json);
currentChunkPosition = 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Buffers;
using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using HotChocolate.Buffers;
using HotChocolate.Fusion.Text.Json;
#else
using System.Buffers;
Expand Down Expand Up @@ -103,7 +104,7 @@ private static SourceResultDocument ParseDocument(ReadOnlySequence<byte> lineBuf

// Ceiling division to make sure we end up with the right amount of chunks.
var chunksNeeded = (requiredSize + JsonMemory.BufferSize - 1) / JsonMemory.BufferSize;
var chunks = JsonMemory.RentRange(chunksNeeded);
var chunks = JsonMemory.RentRange(JsonMemoryKind.Json, chunksNeeded);
var chunkIndex = 0;
var chunkPosition = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Buffers;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using HotChocolate.Fusion.Text.Json;
using HotChocolate.Buffers;

#else
using System.Runtime.CompilerServices;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Buffers;
using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using HotChocolate.Buffers;
using HotChocolate.Fusion.Text.Json;
#else
using System.Buffers;
Expand Down Expand Up @@ -107,7 +108,7 @@ public async IAsyncEnumerator<OperationResult> GetAsyncEnumerator(
case SseEventType.Complete:
reader.AdvanceTo(buffer.GetPosition(1, position.Value));
#if FUSION
JsonMemory.Return(eventBuffers);
JsonMemory.Return(JsonMemoryKind.Json, eventBuffers);
eventBuffers.Clear();
#endif
yield break;
Expand Down Expand Up @@ -162,7 +163,7 @@ public async IAsyncEnumerator<OperationResult> GetAsyncEnumerator(
await reader.CompleteAsync().ConfigureAwait(false);
#if FUSION
// we return whatever is in here.
JsonMemory.Return(eventBuffers);
JsonMemory.Return(JsonMemoryKind.Json, eventBuffers);
#endif
}
}
Expand Down Expand Up @@ -232,7 +233,7 @@ private static void WriteBytesToChunks(List<byte[]> chunks, ref int currentPosit
if (chunks.Count == 0 || currentPosition >= JsonMemory.BufferSize)
{
currentPosition = 0;
chunks.Add(JsonMemory.Rent());
chunks.Add(JsonMemory.Rent(JsonMemoryKind.Json));
}

var currentChunk = chunks[^1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\src\Execution\HotChocolate.Execution.csproj" />
<ProjectReference Include="..\..\..\Core\src\Types\HotChocolate.Types.csproj" />
</ItemGroup>

Expand Down
3 changes: 0 additions & 3 deletions src/HotChocolate/Core/HotChocolate.Core.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<Project Path="src/Execution.Configuration.Abstractions/HotChocolate.Execution.Configuration.Abstractions.csproj" />
<Project Path="src/Execution.Pipeline/HotChocolate.Execution.Pipeline.csproj" />
<Project Path="src/Execution.Projections/HotChocolate.Execution.Projections.csproj" />
<Project Path="src/Execution/HotChocolate.Execution.csproj" />
<Project Path="src/Features/HotChocolate.Features.csproj" />
<Project Path="src/Fetching/HotChocolate.Fetching.csproj" />
<Project Path="src/Subscriptions.InMemory/HotChocolate.Subscriptions.InMemory.csproj" />
<Project Path="src/Subscriptions.Nats/HotChocolate.Subscriptions.Nats.csproj" />
<Project Path="src/Subscriptions.Postgres/HotChocolate.Subscriptions.Postgres.csproj" />
Expand All @@ -29,7 +27,6 @@
<Project Path="src/Types.Queries/HotChocolate.Types.Queries.csproj" />
<Project Path="src/Types.Scalars.Upload/HotChocolate.Types.Scalars.Upload.csproj" />
<Project Path="src/Types.Scalars/HotChocolate.Types.Scalars.csproj" />
<Project Path="src/Types.Shared/HotChocolate.Types.Shared.csproj" />
<Project Path="src/Types.Validation/HotChocolate.Types.Validation.csproj" />
<Project Path="src/Types/HotChocolate.Types.csproj" />
<Project Path="src/Validation/HotChocolate.Validation.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\src\Execution\HotChocolate.Execution.csproj" />
<ProjectReference Include="..\..\..\Core\src\Types\HotChocolate.Types.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Core/HotChocolate.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<ProjectReference Include="..\Types.CursorPagination\HotChocolate.Types.CursorPagination.csproj" />
<ProjectReference Include="..\Types.CursorPagination.Extensions\HotChocolate.Types.CursorPagination.Extensions.csproj" />
<ProjectReference Include="..\Validation\HotChocolate.Validation.csproj" />
<ProjectReference Include="..\Fetching\HotChocolate.Fetching.csproj" />
<ProjectReference Include="..\Execution\HotChocolate.Execution.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public interface ISelection
/// Gets the original syntax nodes that contributed to this selection.
/// </summary>
/// <returns>
/// An enumerable of field nodes from the original GraphQL document that
/// An enumerable collection of field nodes from the original GraphQL document that
/// were merged to create this selection. Multiple nodes may be returned
/// if field merging occurred (same response name, compatible arguments).
/// </returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace HotChocolate.Execution;

/// <summary>
/// A selection set is primarily composed of field selections.
/// When needed a selection set can preserve fragments so that the execution engine
/// can branch the processing of these fragments.
/// </summary>
public interface ISelectionSet
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ProjectReference Include="..\..\..\..\GreenDonut\src\GreenDonut.Data.Abstractions\GreenDonut.Data.Abstractions.csproj" />
<ProjectReference Include="..\..\..\..\GreenDonut\src\GreenDonut.Data.Primitives\GreenDonut.Data.Primitives.csproj" />
<ProjectReference Include="..\..\..\..\GreenDonut\src\GreenDonut.Data\GreenDonut.Data.csproj" />
<ProjectReference Include="..\Execution\HotChocolate.Execution.csproj" />
<ProjectReference Include="..\Types\HotChocolate.Types.csproj" />
</ItemGroup>

</Project>

This file was deleted.

Loading
Loading