Skip to content

Commit dfc98a4

Browse files
authored
NRE fix (#182)
1 parent d0b411f commit dfc98a4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/GraphQL.Authorization/AuthorizationValidationRule.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public Task<INodeVisitor> ValidateAsync(ValidationContext context)
7777
// If some supplied field does not exist in the variable type then some other
7878
// validation rule should check that but here we should just ignore that
7979
// "unknown" field.
80-
if (context.Inputs.TryGetValue(variableRef.Name, out object input) &&
80+
if (context.Inputs != null &&
81+
context.Inputs.TryGetValue(variableRef.Name, out object input) &&
8182
input is Dictionary<string, object> fieldsValues)
8283
{
8384
foreach (var field in variableType.Fields)

0 commit comments

Comments
 (0)