@@ -186,6 +186,7 @@ describe('Execute: defer directive', () => {
186
186
id : '1' ,
187
187
} ,
188
188
} ,
189
+ pending : [ { path : [ 'hero' ] } ] ,
189
190
hasNext : true ,
190
191
} ,
191
192
{
@@ -241,6 +242,7 @@ describe('Execute: defer directive', () => {
241
242
expectJSON ( result ) . toDeepEqual ( [
242
243
{
243
244
data : { hero : { id : '1' } } ,
245
+ pending : [ { path : [ 'hero' ] } ] ,
244
246
hasNext : true ,
245
247
} ,
246
248
{
@@ -271,6 +273,7 @@ describe('Execute: defer directive', () => {
271
273
expectJSON ( result ) . toDeepEqual ( [
272
274
{
273
275
data : { } ,
276
+ pending : [ { path : [ ] , label : 'DeferQuery' } ] ,
274
277
hasNext : true ,
275
278
} ,
276
279
{
@@ -312,6 +315,7 @@ describe('Execute: defer directive', () => {
312
315
expectJSON ( result ) . toDeepEqual ( [
313
316
{
314
317
data : { } ,
318
+ pending : [ { path : [ ] , label : 'DeferQuery' } ] ,
315
319
hasNext : true ,
316
320
} ,
317
321
{
@@ -361,6 +365,10 @@ describe('Execute: defer directive', () => {
361
365
data : {
362
366
hero : { } ,
363
367
} ,
368
+ pending : [
369
+ { path : [ 'hero' ] , label : 'DeferTop' } ,
370
+ { path : [ 'hero' ] , label : 'DeferNested' } ,
371
+ ] ,
364
372
hasNext : true ,
365
373
} ,
366
374
{
@@ -406,6 +414,7 @@ describe('Execute: defer directive', () => {
406
414
name : 'Luke' ,
407
415
} ,
408
416
} ,
417
+ pending : [ { path : [ 'hero' ] , label : 'DeferTop' } ] ,
409
418
hasNext : true ,
410
419
} ,
411
420
{
@@ -434,6 +443,7 @@ describe('Execute: defer directive', () => {
434
443
name : 'Luke' ,
435
444
} ,
436
445
} ,
446
+ pending : [ { path : [ 'hero' ] , label : 'DeferTop' } ] ,
437
447
hasNext : true ,
438
448
} ,
439
449
{
@@ -459,6 +469,7 @@ describe('Execute: defer directive', () => {
459
469
expectJSON ( result ) . toDeepEqual ( [
460
470
{
461
471
data : { hero : { id : '1' } } ,
472
+ pending : [ { path : [ 'hero' ] , label : 'InlineDeferred' } ] ,
462
473
hasNext : true ,
463
474
} ,
464
475
{
@@ -488,6 +499,7 @@ describe('Execute: defer directive', () => {
488
499
data : {
489
500
hero : { } ,
490
501
} ,
502
+ pending : [ { path : [ 'hero' ] } ] ,
491
503
hasNext : true ,
492
504
} ,
493
505
{
@@ -516,6 +528,10 @@ describe('Execute: defer directive', () => {
516
528
data : {
517
529
hero : { } ,
518
530
} ,
531
+ pending : [
532
+ { path : [ 'hero' ] , label : 'DeferID' } ,
533
+ { path : [ 'hero' ] , label : 'DeferName' } ,
534
+ ] ,
519
535
hasNext : true ,
520
536
} ,
521
537
{
@@ -561,6 +577,10 @@ describe('Execute: defer directive', () => {
561
577
expectJSON ( result ) . toDeepEqual ( [
562
578
{
563
579
data : { } ,
580
+ pending : [
581
+ { path : [ ] , label : 'DeferID' } ,
582
+ { path : [ ] , label : 'DeferName' } ,
583
+ ] ,
564
584
hasNext : true ,
565
585
} ,
566
586
{
@@ -611,6 +631,10 @@ describe('Execute: defer directive', () => {
611
631
expectJSON ( result ) . toDeepEqual ( [
612
632
{
613
633
data : { } ,
634
+ pending : [
635
+ { path : [ ] , label : 'DeferID' } ,
636
+ { path : [ ] , label : 'DeferName' } ,
637
+ ] ,
614
638
hasNext : true ,
615
639
} ,
616
640
{
@@ -658,6 +682,10 @@ describe('Execute: defer directive', () => {
658
682
data : {
659
683
hero : { } ,
660
684
} ,
685
+ pending : [
686
+ { path : [ ] , label : 'DeferName' } ,
687
+ { path : [ 'hero' ] , label : 'DeferID' } ,
688
+ ] ,
661
689
hasNext : true ,
662
690
} ,
663
691
{
@@ -701,9 +729,11 @@ describe('Execute: defer directive', () => {
701
729
expectJSON ( result ) . toDeepEqual ( [
702
730
{
703
731
data : { } ,
732
+ pending : [ { path : [ ] , label : 'DeferName' } ] ,
704
733
hasNext : true ,
705
734
} ,
706
735
{
736
+ pending : [ { path : [ 'hero' ] , label : 'DeferID' } ] ,
707
737
incremental : [
708
738
{
709
739
data : {
@@ -763,6 +793,20 @@ describe('Execute: defer directive', () => {
763
793
expectJSON ( result ) . toDeepEqual ( [
764
794
{
765
795
data : { hero : { friends : [ { } , { } , { } ] } } ,
796
+ pending : [
797
+ { path : [ 'hero' , 'friends' , 0 ] } ,
798
+ { path : [ 'hero' , 'friends' , 0 ] } ,
799
+ { path : [ 'hero' , 'friends' , 0 ] } ,
800
+ { path : [ 'hero' , 'friends' , 0 ] } ,
801
+ { path : [ 'hero' , 'friends' , 1 ] } ,
802
+ { path : [ 'hero' , 'friends' , 1 ] } ,
803
+ { path : [ 'hero' , 'friends' , 1 ] } ,
804
+ { path : [ 'hero' , 'friends' , 1 ] } ,
805
+ { path : [ 'hero' , 'friends' , 2 ] } ,
806
+ { path : [ 'hero' , 'friends' , 2 ] } ,
807
+ { path : [ 'hero' , 'friends' , 2 ] } ,
808
+ { path : [ 'hero' , 'friends' , 2 ] } ,
809
+ ] ,
766
810
hasNext : true ,
767
811
} ,
768
812
{
@@ -836,6 +880,7 @@ describe('Execute: defer directive', () => {
836
880
} ,
837
881
} ,
838
882
} ,
883
+ pending : [ { path : [ 'hero' ] } ] ,
839
884
hasNext : true ,
840
885
} ,
841
886
{
@@ -875,9 +920,11 @@ describe('Execute: defer directive', () => {
875
920
data : {
876
921
hero : { } ,
877
922
} ,
923
+ pending : [ { path : [ 'hero' ] } ] ,
878
924
hasNext : true ,
879
925
} ,
880
926
{
927
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
881
928
incremental : [
882
929
{
883
930
data : {
@@ -951,9 +998,11 @@ describe('Execute: defer directive', () => {
951
998
} ,
952
999
} ,
953
1000
} ,
1001
+ pending : [ { path : [ 'hero' ] } ] ,
954
1002
hasNext : true ,
955
1003
} ,
956
1004
{
1005
+ pending : [ { path : [ 'hero' , 'nestedObject' ] } ] ,
957
1006
incremental : [
958
1007
{
959
1008
data : { bar : 'bar' } ,
@@ -964,6 +1013,7 @@ describe('Execute: defer directive', () => {
964
1013
hasNext : true ,
965
1014
} ,
966
1015
{
1016
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
967
1017
incremental : [
968
1018
{
969
1019
data : { baz : 'baz' } ,
@@ -1020,9 +1070,14 @@ describe('Execute: defer directive', () => {
1020
1070
} ,
1021
1071
} ,
1022
1072
} ,
1073
+ pending : [
1074
+ { path : [ 'hero' ] } ,
1075
+ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ,
1076
+ ] ,
1023
1077
hasNext : true ,
1024
1078
} ,
1025
1079
{
1080
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
1026
1081
incremental : [
1027
1082
{
1028
1083
data : {
@@ -1093,6 +1148,7 @@ describe('Execute: defer directive', () => {
1093
1148
} ,
1094
1149
} ,
1095
1150
} ,
1151
+ pending : [ { path : [ ] } , { path : [ 'a' , 'b' ] } ] ,
1096
1152
hasNext : true ,
1097
1153
} ,
1098
1154
{
@@ -1142,6 +1198,7 @@ describe('Execute: defer directive', () => {
1142
1198
data : {
1143
1199
a : { } ,
1144
1200
} ,
1201
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1145
1202
hasNext : true ,
1146
1203
} ,
1147
1204
{
@@ -1204,6 +1261,7 @@ describe('Execute: defer directive', () => {
1204
1261
data : {
1205
1262
a : { } ,
1206
1263
} ,
1264
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1207
1265
hasNext : true ,
1208
1266
} ,
1209
1267
{
@@ -1266,6 +1324,7 @@ describe('Execute: defer directive', () => {
1266
1324
data : {
1267
1325
a : { } ,
1268
1326
} ,
1327
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1269
1328
hasNext : true ,
1270
1329
} ,
1271
1330
{
@@ -1355,6 +1414,7 @@ describe('Execute: defer directive', () => {
1355
1414
expectJSON ( result ) . toDeepEqual ( [
1356
1415
{
1357
1416
data : { } ,
1417
+ pending : [ { path : [ ] } ] ,
1358
1418
hasNext : true ,
1359
1419
} ,
1360
1420
{
@@ -1403,6 +1463,7 @@ describe('Execute: defer directive', () => {
1403
1463
friends : [ { name : 'Han' } , { name : 'Leia' } , { name : 'C-3PO' } ] ,
1404
1464
} ,
1405
1465
} ,
1466
+ pending : [ { path : [ 'hero' ] } ] ,
1406
1467
hasNext : true ,
1407
1468
} ,
1408
1469
{
@@ -1438,6 +1499,7 @@ describe('Execute: defer directive', () => {
1438
1499
expectJSON ( result ) . toDeepEqual ( [
1439
1500
{
1440
1501
data : { hero : { friends : [ { name : 'Han' } ] } } ,
1502
+ pending : [ { path : [ 'hero' ] } ] ,
1441
1503
hasNext : true ,
1442
1504
} ,
1443
1505
{
@@ -1474,6 +1536,7 @@ describe('Execute: defer directive', () => {
1474
1536
expectJSON ( result ) . toDeepEqual ( [
1475
1537
{
1476
1538
data : { hero : { friends : [ ] } } ,
1539
+ pending : [ { path : [ 'hero' ] } ] ,
1477
1540
hasNext : true ,
1478
1541
} ,
1479
1542
{
@@ -1506,6 +1569,7 @@ describe('Execute: defer directive', () => {
1506
1569
friends : [ { name : 'Han' } , { name : 'Leia' } , { name : 'C-3PO' } ] ,
1507
1570
} ,
1508
1571
} ,
1572
+ pending : [ { path : [ 'hero' ] } ] ,
1509
1573
hasNext : true ,
1510
1574
} ,
1511
1575
{
@@ -1553,6 +1617,7 @@ describe('Execute: defer directive', () => {
1553
1617
expectJSON ( result ) . toDeepEqual ( [
1554
1618
{
1555
1619
data : { hero : { friends : [ ] } } ,
1620
+ pending : [ { path : [ 'hero' ] } ] ,
1556
1621
hasNext : true ,
1557
1622
} ,
1558
1623
{
@@ -1586,6 +1651,7 @@ describe('Execute: defer directive', () => {
1586
1651
expectJSON ( result ) . toDeepEqual ( [
1587
1652
{
1588
1653
data : { hero : { nestedObject : null } } ,
1654
+ pending : [ { path : [ 'hero' ] } ] ,
1589
1655
hasNext : true ,
1590
1656
} ,
1591
1657
{
@@ -1619,6 +1685,7 @@ describe('Execute: defer directive', () => {
1619
1685
expectJSON ( result ) . toDeepEqual ( [
1620
1686
{
1621
1687
data : { hero : { nestedObject : { name : 'foo' } } } ,
1688
+ pending : [ { path : [ 'hero' ] } ] ,
1622
1689
hasNext : true ,
1623
1690
} ,
1624
1691
{
@@ -1651,6 +1718,7 @@ describe('Execute: defer directive', () => {
1651
1718
expectJSON ( result ) . toDeepEqual ( [
1652
1719
{
1653
1720
data : { hero : { id : '1' } } ,
1721
+ pending : [ { path : [ 'hero' ] } ] ,
1654
1722
hasNext : true ,
1655
1723
} ,
1656
1724
{
@@ -1693,6 +1761,7 @@ describe('Execute: defer directive', () => {
1693
1761
expectJSON ( result ) . toDeepEqual ( [
1694
1762
{
1695
1763
data : { hero : { id : '1' } } ,
1764
+ pending : [ { path : [ 'hero' ] } ] ,
1696
1765
hasNext : true ,
1697
1766
} ,
1698
1767
{
@@ -1771,6 +1840,7 @@ describe('Execute: defer directive', () => {
1771
1840
expectJSON ( result ) . toDeepEqual ( [
1772
1841
{
1773
1842
data : { hero : { id : '1' } } ,
1843
+ pending : [ { path : [ 'hero' ] } ] ,
1774
1844
hasNext : true ,
1775
1845
} ,
1776
1846
{
@@ -1823,9 +1893,15 @@ describe('Execute: defer directive', () => {
1823
1893
data : {
1824
1894
hero : { id : '1' } ,
1825
1895
} ,
1896
+ pending : [ { path : [ 'hero' ] } ] ,
1826
1897
hasNext : true ,
1827
1898
} ,
1828
1899
{
1900
+ pending : [
1901
+ { path : [ 'hero' , 'friends' , 0 ] } ,
1902
+ { path : [ 'hero' , 'friends' , 1 ] } ,
1903
+ { path : [ 'hero' , 'friends' , 2 ] } ,
1904
+ ] ,
1829
1905
incremental : [
1830
1906
{
1831
1907
data : { name : 'slow' , friends : [ { } , { } , { } ] } ,
@@ -1874,9 +1950,15 @@ describe('Execute: defer directive', () => {
1874
1950
data : {
1875
1951
hero : { id : '1' } ,
1876
1952
} ,
1953
+ pending : [ { path : [ 'hero' ] } ] ,
1877
1954
hasNext : true ,
1878
1955
} ,
1879
1956
{
1957
+ pending : [
1958
+ { path : [ 'hero' , 'friends' , 0 ] } ,
1959
+ { path : [ 'hero' , 'friends' , 1 ] } ,
1960
+ { path : [ 'hero' , 'friends' , 2 ] } ,
1961
+ ] ,
1880
1962
incremental : [
1881
1963
{
1882
1964
data : {
0 commit comments