@@ -703,6 +703,21 @@ public function testGetFieldSelectionWithAliases(): void
703703 ],
704704 ]);
705705
706+ $ queryList = new ObjectType ([
707+ 'name ' => 'Query ' ,
708+ 'fields ' => [
709+ 'level1 ' => [
710+ 'type ' => Type::listOf ($ level1 ),
711+ 'resolve ' => $ returnResolveInfo ,
712+ 'args ' => [
713+ 'testName ' => [
714+ 'type ' => Type::string (),
715+ ],
716+ ],
717+ ],
718+ ],
719+ ]);
720+
706721 $ result1 = GraphQL::executeQuery (
707722 new Schema (['query ' => $ query ]),
708723 <<<GRAPHQL
@@ -828,6 +843,18 @@ public function testGetFieldSelectionWithAliases(): void
828843 GRAPHQL
829844 );
830845
846+ $ result9 = GraphQL::executeQuery (
847+ new Schema (['query ' => $ queryList ]),
848+ <<<GRAPHQL
849+ query {
850+ level1(testName: "NoAliasFirst") {
851+ level2(width: 1, height: 1)
852+ level1000: level2(width: 2, height: 20)
853+ }
854+ }
855+ GRAPHQL
856+ );
857+
831858 self ::assertEmpty ($ result1 ->errors , 'Query NoAlias should have no errors ' );
832859 self ::assertEmpty ($ result2 ->errors , 'Query NoAliasFirst should have no errors ' );
833860 self ::assertEmpty ($ result3 ->errors , 'Query NoAliasLast should have no errors ' );
@@ -836,6 +863,7 @@ public function testGetFieldSelectionWithAliases(): void
836863 self ::assertEmpty ($ result6 ->errors , 'Query WithFragments should have no errors ' );
837864 self ::assertSame ('Failed asserting that two arrays are identical. ' , $ result7 ->errors [0 ]->getMessage (), 'Query DeepestTooLowDepth should have failed ' );
838865 self ::assertEmpty ($ result8 ->errors , 'Query Deepest should have no errors ' );
866+ self ::assertEmpty ($ result9 ->errors , 'Query With ListOf type should have no errors ' );
839867 }
840868
841869 public function testPathAndUnaliasedPath (): void
0 commit comments