From f9454772bcd758848f819a89dfe91764e2b18dbf Mon Sep 17 00:00:00 2001 From: Shane32 Date: Mon, 24 Feb 2025 10:06:57 -0500 Subject: [PATCH 1/2] Prevent GraphQL.NET 8 reflection caching --- src/GraphQL.DI/DIObjectGraphType.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/GraphQL.DI/DIObjectGraphType.cs b/src/GraphQL.DI/DIObjectGraphType.cs index be8077a..603cf3e 100644 --- a/src/GraphQL.DI/DIObjectGraphType.cs +++ b/src/GraphQL.DI/DIObjectGraphType.cs @@ -1,3 +1,4 @@ +using System; using System.Linq.Expressions; using System.Reflection; using GraphQL.Types; @@ -20,6 +21,13 @@ public class DIObjectGraphType : DIObjectGraphType w public class DIObjectGraphType : AutoRegisteringObjectGraphType where TDIGraph : IDIObjectGraphBase { + /// + /// Initializes a new instance of the class. + /// + public DIObjectGraphType() : base(Array.Empty>>()) // prevent GraphQL.NET 8 reflection caching + { + } + /// protected override void ConfigureGraph() { From 33d2cbe66107658c9d884094ac470e45dc4d3308 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Mon, 24 Feb 2025 10:11:05 -0500 Subject: [PATCH 2/2] update --- Sample/Sample.csproj | 2 +- src/Tests/Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sample/Sample.csproj b/Sample/Sample.csproj index 22bef3a..263a770 100644 --- a/Sample/Sample.csproj +++ b/Sample/Sample.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 $(NoWarn);1701;1702;CS1591 diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index df81dcd..49c8a0f 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 $(NoWarn);1701;1702;1591;IDE1006;IDE0060;0618;CA1707;CA1822;CS1591;CA1861;IDE0022;IDE0021;IDE0028;CA1852