Skip to content

Commit ea36952

Browse files
authored
Return null for interfaces in DeriveTypeFromTypeInfo (#228)
1 parent ba856de commit ea36952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GraphQL.Conventions/Adapters/GraphTypeAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private object DeriveTypeFromTypeInfo(Type type)
7373
{
7474
return graphType;
7575
}
76-
return Activator.CreateInstance(type);
76+
return type.IsInterface ? null : Activator.CreateInstance(type);
7777
}
7878

7979
private IObjectGraphType DeriveOperationType(GraphTypeInfo typeInfo) =>

0 commit comments

Comments
 (0)