Skip to content

Commit f945477

Browse files
committed
Prevent GraphQL.NET 8 reflection caching
1 parent c144488 commit f945477

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/GraphQL.DI/DIObjectGraphType.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Linq.Expressions;
23
using System.Reflection;
34
using GraphQL.Types;
@@ -20,6 +21,13 @@ public class DIObjectGraphType<TDIGraph> : DIObjectGraphType<TDIGraph, object> w
2021
public class DIObjectGraphType<TDIGraph, TSource> : AutoRegisteringObjectGraphType<TSource>
2122
where TDIGraph : IDIObjectGraphBase<TSource>
2223
{
24+
/// <summary>
25+
/// Initializes a new instance of the <see cref="DIObjectGraphType{TDIGraph, TSource}"/> class.
26+
/// </summary>
27+
public DIObjectGraphType() : base(Array.Empty<Expression<Func<TSource, object?>>>()) // prevent GraphQL.NET 8 reflection caching
28+
{
29+
}
30+
2331
/// <inheritdoc/>
2432
protected override void ConfigureGraph()
2533
{

0 commit comments

Comments
 (0)