Enhance the tests to cover the end status code as well.

This commit is contained in:
2024-12-06 11:15:38 +00:00
parent fc9bab47fb
commit eb1b4b4eb7
2 changed files with 67 additions and 0 deletions
+9
View File
@@ -184,11 +184,20 @@ func checkSelections(c *fiber.Ctx, selections []ast.Selection) bool {
return true
}
}
// Check nested selections even if current field is allowed
if sel.SelectionSet != nil {
if checkSelections(c, sel.GetSelectionSet().Selections) {
return true
}
}
case *ast.InlineFragment:
if sel.SelectionSet != nil {
if checkSelections(c, sel.GetSelectionSet().Selections) {
return true
}
}
case *ast.FragmentSpread:
// If we need to handle fragment spreads, additional logic would go here
}
}
return false