Skip to content

Commit

Permalink
Merge acbcc0c into e3f807a
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed May 11, 2021
2 parents e3f807a + acbcc0c commit ccf91d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Type/Definition/QueryPlan.php
Expand Up @@ -11,6 +11,7 @@
use GraphQL\Language\AST\FragmentSpreadNode;
use GraphQL\Language\AST\InlineFragmentNode;
use GraphQL\Language\AST\SelectionSetNode;
use GraphQL\Type\Introspection;
use GraphQL\Type\Schema;
use function array_diff_key;
use function array_filter;
Expand Down Expand Up @@ -167,7 +168,12 @@ private function analyzeSelectionSet(SelectionSetNode $selectionSet, Type $paren
$implementors = [];
foreach ($selectionSet->selections as $selectionNode) {
if ($selectionNode instanceof FieldNode) {
$fieldName = $selectionNode->name->value;
$fieldName = $selectionNode->name->value;

if ($fieldName === Introspection::TYPE_NAME_FIELD_NAME) {
continue;
}

$type = $parentType->getField($fieldName);
$selectionType = $type->getType();

Expand Down
1 change: 1 addition & 0 deletions tests/Type/QueryPlanTest.php
Expand Up @@ -72,6 +72,7 @@ public function testQueryPlan() : void
$doc = '
query Test {
article {
__typename
author {
name
pic(width: 100, height: 200) {
Expand Down

0 comments on commit ccf91d8

Please sign in to comment.