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/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() { 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