Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/HotChocolate/Core/src/Types/Types/Scalars/Scalars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ public static class Scalars
{ typeof(DateOnly), typeof(LocalDateType) },
{ typeof(DateTime), typeof(DateTimeType) },
{ typeof(DateTimeOffset), typeof(DateTimeType) },
{ typeof(Dictionary<string, object>), typeof(AnyType) },
{ typeof(decimal), typeof(DecimalType) },
{ typeof(double), typeof(FloatType) },
{ typeof(float), typeof(FloatType) },
{ typeof(Guid), typeof(UuidType) },
{ typeof(IDictionary<string, object>), typeof(AnyType) },
{ typeof(int), typeof(IntType) },
{ typeof(IReadOnlyDictionary<string, object>), typeof(AnyType) },
{ typeof(JsonElement), typeof(AnyType) },
{ typeof(long), typeof(LongType) },
{ typeof(object), typeof(AnyType) },
{ typeof(sbyte), typeof(ByteType) },
{ typeof(short), typeof(ShortType) },
{ typeof(string), typeof(StringType) },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using HotChocolate.Execution;
using Microsoft.Extensions.DependencyInjection;

namespace HotChocolate.Types;

public class Issue6970ReproTests
{
[Fact]
public async Task Schema_With_IDictionary_String_Object_Output_Field_Builds()
{
var exception = await Record.ExceptionAsync(async () =>
await new ServiceCollection()
.AddGraphQLServer()
.AddQueryType<Query>()
.BuildSchemaAsync());

Assert.Null(exception);
}

public sealed class Query
{
public PageVOAllergyIntolerance Item => new();
}

public sealed class PageVOAllergyIntolerance
{
public IDictionary<string, object> Extension { get; } =
new Dictionary<string, object>
{
["foo"] = "bar"
};
}
}
Loading