Skip to content

Commit 8ec6cd8

Browse files
authored
Ignore validation check if FieldType is null (#14)
1 parent 11c319d commit 8ec6cd8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/GraphQL.Authorization/AuthorizationValidationRule.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public INodeVisitor Validate(ValidationContext context)
3737
_.Match<Field>(fieldAst =>
3838
{
3939
var fieldDef = context.TypeInfo.GetFieldDef();
40+
41+
if (fieldDef == null) return;
42+
4043
// check target field
4144
CheckAuth(fieldAst, fieldDef, userContext, context, operationType);
4245
// check returned graph type

0 commit comments

Comments
 (0)