diff --git a/src/HotChocolate/Adapters/src/Adapters.Mcp.Packaging/McpFeatureCollectionArchive.cs b/src/HotChocolate/Adapters/src/Adapters.Mcp.Packaging/McpFeatureCollectionArchive.cs
index 4a482b11536..60bb8e8a0b4 100644
--- a/src/HotChocolate/Adapters/src/Adapters.Mcp.Packaging/McpFeatureCollectionArchive.cs
+++ b/src/HotChocolate/Adapters/src/Adapters.Mcp.Packaging/McpFeatureCollectionArchive.cs
@@ -399,11 +399,11 @@ public async Task AddToolAsync(
if (_session.Exists(viewPath))
{
- await using var componentStream = await _session.OpenReadAsync(
+ await using var viewStream = await _session.OpenReadAsync(
viewPath,
FileKind.View,
cancellationToken);
- await componentStream.CopyToAsync(buffer, cancellationToken);
+ await viewStream.CopyToAsync(buffer, cancellationToken);
view = buffer.WrittenMemory.ToArray();
buffer.Clear();
}
diff --git a/src/HotChocolate/Core/src/Types.NodaTime/HotChocolate.Types.NodaTime.csproj b/src/HotChocolate/Core/src/Types.NodaTime/HotChocolate.Types.NodaTime.csproj
index 9088f6cb7b0..3851560c875 100644
--- a/src/HotChocolate/Core/src/Types.NodaTime/HotChocolate.Types.NodaTime.csproj
+++ b/src/HotChocolate/Core/src/Types.NodaTime/HotChocolate.Types.NodaTime.csproj
@@ -38,8 +38,4 @@
-
-
-
-
diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/Scalars.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/Scalars.cs
index 16ab2f3c006..0f1f23c93a5 100644
--- a/src/HotChocolate/Core/src/Types/Types/Scalars/Scalars.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Scalars/Scalars.cs
@@ -66,35 +66,6 @@ public static class Scalars
{ ScalarNames.UUID, typeof(UuidType) }
};
- private static readonly Dictionary s_scalarKinds = new()
- {
- { typeof(bool?), ValueKind.Boolean },
- { typeof(bool), ValueKind.Boolean },
- { typeof(byte?), ValueKind.Integer },
- { typeof(byte), ValueKind.Integer },
- { typeof(decimal?), ValueKind.Float },
- { typeof(decimal), ValueKind.Float },
- { typeof(double?), ValueKind.Float },
- { typeof(double), ValueKind.Float },
- { typeof(float?), ValueKind.Float },
- { typeof(float), ValueKind.Float },
- { typeof(int?), ValueKind.Integer },
- { typeof(int), ValueKind.Integer },
- { typeof(long?), ValueKind.Integer },
- { typeof(long), ValueKind.Integer },
- { typeof(sbyte?), ValueKind.Integer },
- { typeof(sbyte), ValueKind.Integer },
- { typeof(short?), ValueKind.Integer },
- { typeof(short), ValueKind.Integer },
- { typeof(string), ValueKind.String },
- { typeof(uint?), ValueKind.Integer },
- { typeof(uint), ValueKind.Integer },
- { typeof(ulong?), ValueKind.Integer },
- { typeof(ulong), ValueKind.Integer },
- { typeof(ushort?), ValueKind.Integer },
- { typeof(ushort), ValueKind.Integer }
- };
-
private static readonly HashSet s_specScalars =
[
ScalarNames.ID,
@@ -134,55 +105,6 @@ public static bool IsBuiltIn(string typeName)
=> !string.IsNullOrEmpty(typeName)
&& s_nameLookup.ContainsKey(typeName);
- ///
- /// Tries to infer the GraphQL literal kind from a runtime value.
- ///
- ///
- /// The runtime value.
- ///
- ///
- /// The expected GraphQL literal kind.
- ///
- ///
- /// true if the literal kind can be inferred.
- ///
- public static bool TryGetKind(object? value, out ValueKind kind)
- {
- if (value is null)
- {
- kind = ValueKind.Null;
- return true;
- }
-
- var valueType = value.GetType();
-
- if (valueType.IsEnum)
- {
- kind = ValueKind.Enum;
- return true;
- }
-
- if (s_scalarKinds.TryGetValue(valueType, out kind))
- {
- return true;
- }
-
- if (value is IDictionary)
- {
- kind = ValueKind.Object;
- return true;
- }
-
- if (value is ICollection)
- {
- kind = ValueKind.List;
- return true;
- }
-
- kind = ValueKind.Unknown;
- return false;
- }
-
internal static bool IsSpec(string typeName)
=> s_specScalars.Contains(typeName);
}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/ScalarsTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/ScalarsTests.cs
deleted file mode 100644
index 9bb95a99b18..00000000000
--- a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/ScalarsTests.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-namespace HotChocolate.Types;
-
-public class ScalarsTests
-{
- [InlineData(Foo.Bar, ValueKind.Enum)]
- [InlineData("foo", ValueKind.String)]
- [InlineData((short)1, ValueKind.Integer)]
- [InlineData(1, ValueKind.Integer)]
- [InlineData((long)1, ValueKind.Integer)]
- [InlineData((ushort)1, ValueKind.Integer)]
- [InlineData((uint)1, ValueKind.Integer)]
- [InlineData((ulong)1, ValueKind.Integer)]
- [InlineData((float)1, ValueKind.Float)]
- [InlineData((double)1, ValueKind.Float)]
- [InlineData(null, ValueKind.Null)]
- [Theory]
- public void TryGetKind(object? value, ValueKind expectedKind)
- {
- // arrange
- // act
- var isScalar = Scalars.TryGetKind(value, out var kind);
-
- // assert
- Assert.True(isScalar);
- Assert.Equal(expectedKind, kind);
- }
-
- [InlineData(Foo.Bar, ValueKind.Enum)]
- [InlineData((short)1, ValueKind.Integer)]
- [InlineData(1, ValueKind.Integer)]
- [InlineData((long)1, ValueKind.Integer)]
- [InlineData((ushort)1, ValueKind.Integer)]
- [InlineData((uint)1, ValueKind.Integer)]
- [InlineData((ulong)1, ValueKind.Integer)]
- [InlineData((float)1, ValueKind.Float)]
- [InlineData((double)1, ValueKind.Float)]
- [Theory]
- public void TryGetKind_From_Nullable(
- object value,
- ValueKind expectedKind)
- {
- // arrange
- var type = typeof(Nullable<>).MakeGenericType(value.GetType());
- var constructor =
- type.GetConstructor([value.GetType()]);
- var nullableValue = constructor!.Invoke([value]);
-
- // act
- var isScalar = Scalars.TryGetKind(
- nullableValue, out var kind);
-
- // assert
- Assert.True(isScalar);
- Assert.Equal(expectedKind, kind);
- }
-
- [Fact]
- public void Decimal_Is_Float()
- {
- // arrange
- const decimal d = 123.123M;
-
- // act
- var isScalar = Scalars.TryGetKind(d, out var kind);
-
- // assert
- Assert.True(isScalar);
- Assert.Equal(ValueKind.Float, kind);
- }
-
- [Fact]
- public void NullableDecimal_Is_Float()
- {
- // arrange
- decimal? d = 123.123M;
-
- // act
- var isScalar = Scalars.TryGetKind(d, out var kind);
-
- // assert
- Assert.True(isScalar);
- Assert.Equal(ValueKind.Float, kind);
- }
-
- [Fact]
- public void Object_Is_Not_A_Serialized_Scalar()
- {
- // arrange
- var o = new object();
-
- // act
- var isScalar = Scalars.TryGetKind(o, out _);
-
- // assert
- Assert.False(isScalar);
- }
-
- [Fact]
- public void List_From_ListOfObject()
- {
- // arrange
- var list = new List