@@ -703,6 +703,21 @@ public function testGetFieldSelectionWithAliases(): void
703
703
],
704
704
]);
705
705
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
+
706
721
$ result1 = GraphQL::executeQuery (
707
722
new Schema (['query ' => $ query ]),
708
723
<<<GRAPHQL
@@ -828,6 +843,18 @@ public function testGetFieldSelectionWithAliases(): void
828
843
GRAPHQL
829
844
);
830
845
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
+
831
858
self ::assertEmpty ($ result1 ->errors , 'Query NoAlias should have no errors ' );
832
859
self ::assertEmpty ($ result2 ->errors , 'Query NoAliasFirst should have no errors ' );
833
860
self ::assertEmpty ($ result3 ->errors , 'Query NoAliasLast should have no errors ' );
@@ -836,6 +863,7 @@ public function testGetFieldSelectionWithAliases(): void
836
863
self ::assertEmpty ($ result6 ->errors , 'Query WithFragments should have no errors ' );
837
864
self ::assertSame ('Failed asserting that two arrays are identical. ' , $ result7 ->errors [0 ]->getMessage (), 'Query DeepestTooLowDepth should have failed ' );
838
865
self ::assertEmpty ($ result8 ->errors , 'Query Deepest should have no errors ' );
866
+ self ::assertEmpty ($ result9 ->errors , 'Query With ListOf type should have no errors ' );
839
867
}
840
868
841
869
public function testPathAndUnaliasedPath (): void
0 commit comments