(cond string, dirs ast.DirectiveList, sel ast.SelectionSet, concrete *ast.Definition, required, checked bool, out *[]selected)
| 247 | } |
| 248 | |
| 249 | func (w *gqlWalker) collectFragment(cond string, dirs ast.DirectiveList, sel ast.SelectionSet, concrete *ast.Definition, required, checked bool, out *[]selected) { |
| 250 | included, known := directiveCondition(dirs, w.variables) |
| 251 | if !included { |
| 252 | return |
| 253 | } |
| 254 | required = required && known |
| 255 | switch { |
| 256 | case cond == "": |
| 257 | case concrete == nil: |
| 258 | required, checked = false, false |
| 259 | case !w.isA(concrete, cond): |
| 260 | return |
| 261 | } |
| 262 | w.collectFields(sel, concrete, required, checked, out) |
| 263 | } |
| 264 | |
| 265 | func directiveCondition(dirs ast.DirectiveList, variables map[string]any) (included, known bool) { |
| 266 | known = true |
no test coverage detected