Open sungam3r opened 3 years ago
https://lgtm.com/projects/g/graphql-dotnet/graphql-dotnet/snapshot/71e3fc454901355ca93f115b0004d510b683b056/files/src/GraphQL/Execution/ExecutionHelper.cs?sort=name&dir=ASC&mode=heatmap#x9cfe0b597cc40b2b:1
Both IObjectGraphType and IInputObjectGraphType inherit from IComplexGraphType so complexType variable is always not null.
IObjectGraphType
IInputObjectGraphType
IComplexGraphType
complexType
In that case I suggest you change type as IComplexGraphType to (IComplexGraphType)type, which will makes the intent clear (and gets rid of the alert).
type as IComplexGraphType
(IComplexGraphType)type
OK but it's still false positive.
https://lgtm.com/projects/g/graphql-dotnet/graphql-dotnet/snapshot/71e3fc454901355ca93f115b0004d510b683b056/files/src/GraphQL/Execution/ExecutionHelper.cs?sort=name&dir=ASC&mode=heatmap#x9cfe0b597cc40b2b:1
Both
IObjectGraphType
andIInputObjectGraphType
inherit fromIComplexGraphType
socomplexType
variable is always not null.