@@ 514-522 (lines=9) @@ | ||
511 | $fieldType = $currentLevelAST->getType()->getNamedType(); |
|
512 | if ($fieldType instanceof AbstractUnionType) { |
|
513 | foreach ($fieldType->getTypes() as $unionFieldType) { |
|
514 | if ($fieldAst = $unionFieldType->getField($queryField->getName())) { |
|
515 | $gen = $this->walkQuery($queryField, $fieldAst); |
|
516 | $next = $gen->current(); |
|
517 | while ($next) { |
|
518 | $received = (yield $next); |
|
519 | $childrenScore += (int)$received; |
|
520 | $next = $gen->send($received); |
|
521 | } |
|
522 | } |
|
523 | } |
|
524 | } elseif ($fieldType instanceof AbstractObjectType && $fieldAst = $fieldType->getField($queryField->getName())) { |
|
525 | $gen = $this->walkQuery($queryField, $fieldAst); |
|
@@ 524-532 (lines=9) @@ | ||
521 | } |
|
522 | } |
|
523 | } |
|
524 | } elseif ($fieldType instanceof AbstractObjectType && $fieldAst = $fieldType->getField($queryField->getName())) { |
|
525 | $gen = $this->walkQuery($queryField, $fieldAst); |
|
526 | $next = $gen->current(); |
|
527 | while ($next) { |
|
528 | $received = (yield $next); |
|
529 | $childrenScore += (int)$received; |
|
530 | $next = $gen->send($received); |
|
531 | } |
|
532 | } |
|
533 | } |
|
534 | } |
|
535 | } |