@@ -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
{
@@ -658,6 +678,10 @@ describe('Execute: defer directive', () => {
658
678
data : {
659
679
hero : { } ,
660
680
} ,
681
+ pending : [
682
+ { path : [ ] , label : 'DeferName' } ,
683
+ { path : [ 'hero' ] , label : 'DeferID' } ,
684
+ ] ,
661
685
hasNext : true ,
662
686
} ,
663
687
{
@@ -701,9 +725,11 @@ describe('Execute: defer directive', () => {
701
725
expectJSON ( result ) . toDeepEqual ( [
702
726
{
703
727
data : { } ,
728
+ pending : [ { path : [ ] , label : 'DeferName' } ] ,
704
729
hasNext : true ,
705
730
} ,
706
731
{
732
+ pending : [ { path : [ 'hero' ] , label : 'DeferID' } ] ,
707
733
incremental : [
708
734
{
709
735
data : {
@@ -763,6 +789,20 @@ describe('Execute: defer directive', () => {
763
789
expectJSON ( result ) . toDeepEqual ( [
764
790
{
765
791
data : { hero : { friends : [ { } , { } , { } ] } } ,
792
+ pending : [
793
+ { path : [ 'hero' , 'friends' , 0 ] } ,
794
+ { path : [ 'hero' , 'friends' , 0 ] } ,
795
+ { path : [ 'hero' , 'friends' , 0 ] } ,
796
+ { path : [ 'hero' , 'friends' , 0 ] } ,
797
+ { path : [ 'hero' , 'friends' , 1 ] } ,
798
+ { path : [ 'hero' , 'friends' , 1 ] } ,
799
+ { path : [ 'hero' , 'friends' , 1 ] } ,
800
+ { path : [ 'hero' , 'friends' , 1 ] } ,
801
+ { path : [ 'hero' , 'friends' , 2 ] } ,
802
+ { path : [ 'hero' , 'friends' , 2 ] } ,
803
+ { path : [ 'hero' , 'friends' , 2 ] } ,
804
+ { path : [ 'hero' , 'friends' , 2 ] } ,
805
+ ] ,
766
806
hasNext : true ,
767
807
} ,
768
808
{
@@ -836,6 +876,7 @@ describe('Execute: defer directive', () => {
836
876
} ,
837
877
} ,
838
878
} ,
879
+ pending : [ { path : [ 'hero' ] } ] ,
839
880
hasNext : true ,
840
881
} ,
841
882
{
@@ -875,9 +916,11 @@ describe('Execute: defer directive', () => {
875
916
data : {
876
917
hero : { } ,
877
918
} ,
919
+ pending : [ { path : [ 'hero' ] } ] ,
878
920
hasNext : true ,
879
921
} ,
880
922
{
923
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
881
924
incremental : [
882
925
{
883
926
data : {
@@ -951,9 +994,11 @@ describe('Execute: defer directive', () => {
951
994
} ,
952
995
} ,
953
996
} ,
997
+ pending : [ { path : [ 'hero' ] } ] ,
954
998
hasNext : true ,
955
999
} ,
956
1000
{
1001
+ pending : [ { path : [ 'hero' , 'nestedObject' ] } ] ,
957
1002
incremental : [
958
1003
{
959
1004
data : { bar : 'bar' } ,
@@ -964,6 +1009,7 @@ describe('Execute: defer directive', () => {
964
1009
hasNext : true ,
965
1010
} ,
966
1011
{
1012
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
967
1013
incremental : [
968
1014
{
969
1015
data : { baz : 'baz' } ,
@@ -1020,9 +1066,14 @@ describe('Execute: defer directive', () => {
1020
1066
} ,
1021
1067
} ,
1022
1068
} ,
1069
+ pending : [
1070
+ { path : [ 'hero' ] } ,
1071
+ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ,
1072
+ ] ,
1023
1073
hasNext : true ,
1024
1074
} ,
1025
1075
{
1076
+ pending : [ { path : [ 'hero' , 'nestedObject' , 'deeperObject' ] } ] ,
1026
1077
incremental : [
1027
1078
{
1028
1079
data : {
@@ -1093,6 +1144,7 @@ describe('Execute: defer directive', () => {
1093
1144
} ,
1094
1145
} ,
1095
1146
} ,
1147
+ pending : [ { path : [ ] } , { path : [ 'a' , 'b' ] } ] ,
1096
1148
hasNext : true ,
1097
1149
} ,
1098
1150
{
@@ -1142,6 +1194,7 @@ describe('Execute: defer directive', () => {
1142
1194
data : {
1143
1195
a : { } ,
1144
1196
} ,
1197
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1145
1198
hasNext : true ,
1146
1199
} ,
1147
1200
{
@@ -1204,6 +1257,7 @@ describe('Execute: defer directive', () => {
1204
1257
data : {
1205
1258
a : { } ,
1206
1259
} ,
1260
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1207
1261
hasNext : true ,
1208
1262
} ,
1209
1263
{
@@ -1266,6 +1320,7 @@ describe('Execute: defer directive', () => {
1266
1320
data : {
1267
1321
a : { } ,
1268
1322
} ,
1323
+ pending : [ { path : [ ] } , { path : [ 'a' ] } ] ,
1269
1324
hasNext : true ,
1270
1325
} ,
1271
1326
{
@@ -1355,6 +1410,7 @@ describe('Execute: defer directive', () => {
1355
1410
expectJSON ( result ) . toDeepEqual ( [
1356
1411
{
1357
1412
data : { } ,
1413
+ pending : [ { path : [ ] } ] ,
1358
1414
hasNext : true ,
1359
1415
} ,
1360
1416
{
@@ -1403,6 +1459,7 @@ describe('Execute: defer directive', () => {
1403
1459
friends : [ { name : 'Han' } , { name : 'Leia' } , { name : 'C-3PO' } ] ,
1404
1460
} ,
1405
1461
} ,
1462
+ pending : [ { path : [ 'hero' ] } ] ,
1406
1463
hasNext : true ,
1407
1464
} ,
1408
1465
{
@@ -1438,6 +1495,7 @@ describe('Execute: defer directive', () => {
1438
1495
expectJSON ( result ) . toDeepEqual ( [
1439
1496
{
1440
1497
data : { hero : { friends : [ { name : 'Han' } ] } } ,
1498
+ pending : [ { path : [ 'hero' ] } ] ,
1441
1499
hasNext : true ,
1442
1500
} ,
1443
1501
{
@@ -1474,6 +1532,7 @@ describe('Execute: defer directive', () => {
1474
1532
expectJSON ( result ) . toDeepEqual ( [
1475
1533
{
1476
1534
data : { hero : { friends : [ ] } } ,
1535
+ pending : [ { path : [ 'hero' ] } ] ,
1477
1536
hasNext : true ,
1478
1537
} ,
1479
1538
{
@@ -1506,6 +1565,7 @@ describe('Execute: defer directive', () => {
1506
1565
friends : [ { name : 'Han' } , { name : 'Leia' } , { name : 'C-3PO' } ] ,
1507
1566
} ,
1508
1567
} ,
1568
+ pending : [ { path : [ 'hero' ] } ] ,
1509
1569
hasNext : true ,
1510
1570
} ,
1511
1571
{
@@ -1553,6 +1613,7 @@ describe('Execute: defer directive', () => {
1553
1613
expectJSON ( result ) . toDeepEqual ( [
1554
1614
{
1555
1615
data : { hero : { friends : [ ] } } ,
1616
+ pending : [ { path : [ 'hero' ] } ] ,
1556
1617
hasNext : true ,
1557
1618
} ,
1558
1619
{
@@ -1586,6 +1647,7 @@ describe('Execute: defer directive', () => {
1586
1647
expectJSON ( result ) . toDeepEqual ( [
1587
1648
{
1588
1649
data : { hero : { nestedObject : null } } ,
1650
+ pending : [ { path : [ 'hero' ] } ] ,
1589
1651
hasNext : true ,
1590
1652
} ,
1591
1653
{
@@ -1619,6 +1681,7 @@ describe('Execute: defer directive', () => {
1619
1681
expectJSON ( result ) . toDeepEqual ( [
1620
1682
{
1621
1683
data : { hero : { nestedObject : { name : 'foo' } } } ,
1684
+ pending : [ { path : [ 'hero' ] } ] ,
1622
1685
hasNext : true ,
1623
1686
} ,
1624
1687
{
@@ -1651,6 +1714,7 @@ describe('Execute: defer directive', () => {
1651
1714
expectJSON ( result ) . toDeepEqual ( [
1652
1715
{
1653
1716
data : { hero : { id : '1' } } ,
1717
+ pending : [ { path : [ 'hero' ] } ] ,
1654
1718
hasNext : true ,
1655
1719
} ,
1656
1720
{
@@ -1693,6 +1757,7 @@ describe('Execute: defer directive', () => {
1693
1757
expectJSON ( result ) . toDeepEqual ( [
1694
1758
{
1695
1759
data : { hero : { id : '1' } } ,
1760
+ pending : [ { path : [ 'hero' ] } ] ,
1696
1761
hasNext : true ,
1697
1762
} ,
1698
1763
{
@@ -1771,6 +1836,7 @@ describe('Execute: defer directive', () => {
1771
1836
expectJSON ( result ) . toDeepEqual ( [
1772
1837
{
1773
1838
data : { hero : { id : '1' } } ,
1839
+ pending : [ { path : [ 'hero' ] } ] ,
1774
1840
hasNext : true ,
1775
1841
} ,
1776
1842
{
@@ -1823,9 +1889,15 @@ describe('Execute: defer directive', () => {
1823
1889
data : {
1824
1890
hero : { id : '1' } ,
1825
1891
} ,
1892
+ pending : [ { path : [ 'hero' ] } ] ,
1826
1893
hasNext : true ,
1827
1894
} ,
1828
1895
{
1896
+ pending : [
1897
+ { path : [ 'hero' , 'friends' , 0 ] } ,
1898
+ { path : [ 'hero' , 'friends' , 1 ] } ,
1899
+ { path : [ 'hero' , 'friends' , 2 ] } ,
1900
+ ] ,
1829
1901
incremental : [
1830
1902
{
1831
1903
data : { name : 'slow' , friends : [ { } , { } , { } ] } ,
@@ -1874,9 +1946,15 @@ describe('Execute: defer directive', () => {
1874
1946
data : {
1875
1947
hero : { id : '1' } ,
1876
1948
} ,
1949
+ pending : [ { path : [ 'hero' ] } ] ,
1877
1950
hasNext : true ,
1878
1951
} ,
1879
1952
{
1953
+ pending : [
1954
+ { path : [ 'hero' , 'friends' , 0 ] } ,
1955
+ { path : [ 'hero' , 'friends' , 1 ] } ,
1956
+ { path : [ 'hero' , 'friends' , 2 ] } ,
1957
+ ] ,
1880
1958
incremental : [
1881
1959
{
1882
1960
data : {
0 commit comments