@quesmed/types 2.2.92 → 2.2.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/resolvers/fragments/marksheet.js +2 -0
- package/dist/cjs/resolvers/mutation/restricted/marksheet.js +24 -0
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.d.ts +1 -1
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +7 -3
- package/dist/cjs/resolvers/query/restricted/marksheet.js +26 -0
- package/dist/cjs/resolvers/query/restricted/question.js +8 -0
- package/dist/mjs/resolvers/fragments/marksheet.js +2 -0
- package/dist/mjs/resolvers/mutation/restricted/marksheet.js +24 -0
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +1 -1
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +7 -3
- package/dist/mjs/resolvers/query/restricted/marksheet.js +26 -0
- package/dist/mjs/resolvers/query/restricted/question.js +8 -0
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
|
|
|
47
47
|
id
|
|
48
48
|
createdAt
|
|
49
49
|
comment
|
|
50
|
+
parentId
|
|
50
51
|
likes
|
|
51
52
|
user {
|
|
52
53
|
id
|
|
@@ -59,6 +60,7 @@ exports.MARKSHEET_MARK_FIELDS = (0, client_1.gql) `
|
|
|
59
60
|
id
|
|
60
61
|
createdAt
|
|
61
62
|
comment
|
|
63
|
+
parentId
|
|
62
64
|
user {
|
|
63
65
|
id
|
|
64
66
|
displayName
|
|
@@ -91,6 +91,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
91
91
|
createdAt
|
|
92
92
|
comment
|
|
93
93
|
likes
|
|
94
|
+
parentId
|
|
94
95
|
user {
|
|
95
96
|
id
|
|
96
97
|
displayName
|
|
@@ -101,6 +102,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
101
102
|
replies {
|
|
102
103
|
id
|
|
103
104
|
createdAt
|
|
105
|
+
parentId
|
|
104
106
|
comment
|
|
105
107
|
user {
|
|
106
108
|
id
|
|
@@ -207,6 +209,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
207
209
|
id
|
|
208
210
|
createdAt
|
|
209
211
|
comment
|
|
212
|
+
parentId
|
|
210
213
|
likes
|
|
211
214
|
user {
|
|
212
215
|
id
|
|
@@ -219,6 +222,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
219
222
|
id
|
|
220
223
|
createdAt
|
|
221
224
|
comment
|
|
225
|
+
parentId
|
|
222
226
|
user {
|
|
223
227
|
id
|
|
224
228
|
displayName
|
|
@@ -327,6 +331,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
327
331
|
id
|
|
328
332
|
createdAt
|
|
329
333
|
comment
|
|
334
|
+
parentId
|
|
330
335
|
likes
|
|
331
336
|
user {
|
|
332
337
|
id
|
|
@@ -339,6 +344,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
339
344
|
id
|
|
340
345
|
createdAt
|
|
341
346
|
comment
|
|
347
|
+
parentId
|
|
342
348
|
user {
|
|
343
349
|
id
|
|
344
350
|
displayName
|
|
@@ -444,6 +450,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
444
450
|
id
|
|
445
451
|
createdAt
|
|
446
452
|
comment
|
|
453
|
+
parentId
|
|
447
454
|
likes
|
|
448
455
|
user {
|
|
449
456
|
id
|
|
@@ -456,6 +463,7 @@ exports.BUILD_QUESTION_MARKSHEET = (0, client_1.gql) `
|
|
|
456
463
|
id
|
|
457
464
|
createdAt
|
|
458
465
|
comment
|
|
466
|
+
parentId
|
|
459
467
|
user {
|
|
460
468
|
id
|
|
461
469
|
displayName
|
|
@@ -656,6 +664,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
656
664
|
id
|
|
657
665
|
createdAt
|
|
658
666
|
comment
|
|
667
|
+
parentId
|
|
659
668
|
likes
|
|
660
669
|
user {
|
|
661
670
|
id
|
|
@@ -668,6 +677,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
668
677
|
id
|
|
669
678
|
createdAt
|
|
670
679
|
comment
|
|
680
|
+
parentId
|
|
671
681
|
user {
|
|
672
682
|
id
|
|
673
683
|
displayName
|
|
@@ -773,6 +783,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
773
783
|
id
|
|
774
784
|
createdAt
|
|
775
785
|
comment
|
|
786
|
+
parentId
|
|
776
787
|
likes
|
|
777
788
|
user {
|
|
778
789
|
id
|
|
@@ -785,6 +796,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
785
796
|
id
|
|
786
797
|
createdAt
|
|
787
798
|
comment
|
|
799
|
+
parentId
|
|
788
800
|
user {
|
|
789
801
|
id
|
|
790
802
|
displayName
|
|
@@ -893,6 +905,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
893
905
|
id
|
|
894
906
|
createdAt
|
|
895
907
|
comment
|
|
908
|
+
parentId
|
|
896
909
|
likes
|
|
897
910
|
user {
|
|
898
911
|
id
|
|
@@ -905,6 +918,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
905
918
|
id
|
|
906
919
|
createdAt
|
|
907
920
|
comment
|
|
921
|
+
parentId
|
|
908
922
|
user {
|
|
909
923
|
id
|
|
910
924
|
displayName
|
|
@@ -1010,6 +1024,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1010
1024
|
id
|
|
1011
1025
|
createdAt
|
|
1012
1026
|
comment
|
|
1027
|
+
parentId
|
|
1013
1028
|
likes
|
|
1014
1029
|
user {
|
|
1015
1030
|
id
|
|
@@ -1022,6 +1037,7 @@ exports.BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1022
1037
|
id
|
|
1023
1038
|
createdAt
|
|
1024
1039
|
comment
|
|
1040
|
+
parentId
|
|
1025
1041
|
user {
|
|
1026
1042
|
id
|
|
1027
1043
|
displayName
|
|
@@ -1227,6 +1243,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1227
1243
|
id
|
|
1228
1244
|
createdAt
|
|
1229
1245
|
comment
|
|
1246
|
+
parentId
|
|
1230
1247
|
likes
|
|
1231
1248
|
user {
|
|
1232
1249
|
id
|
|
@@ -1239,6 +1256,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1239
1256
|
id
|
|
1240
1257
|
createdAt
|
|
1241
1258
|
comment
|
|
1259
|
+
parentId
|
|
1242
1260
|
user {
|
|
1243
1261
|
id
|
|
1244
1262
|
displayName
|
|
@@ -1344,6 +1362,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1344
1362
|
id
|
|
1345
1363
|
createdAt
|
|
1346
1364
|
comment
|
|
1365
|
+
parentId
|
|
1347
1366
|
likes
|
|
1348
1367
|
user {
|
|
1349
1368
|
id
|
|
@@ -1356,6 +1375,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1356
1375
|
id
|
|
1357
1376
|
createdAt
|
|
1358
1377
|
comment
|
|
1378
|
+
parentId
|
|
1359
1379
|
user {
|
|
1360
1380
|
id
|
|
1361
1381
|
displayName
|
|
@@ -1464,6 +1484,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1464
1484
|
id
|
|
1465
1485
|
createdAt
|
|
1466
1486
|
comment
|
|
1487
|
+
parentId
|
|
1467
1488
|
likes
|
|
1468
1489
|
user {
|
|
1469
1490
|
id
|
|
@@ -1476,6 +1497,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1476
1497
|
id
|
|
1477
1498
|
createdAt
|
|
1478
1499
|
comment
|
|
1500
|
+
parentId
|
|
1479
1501
|
user {
|
|
1480
1502
|
id
|
|
1481
1503
|
displayName
|
|
@@ -1581,6 +1603,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1581
1603
|
id
|
|
1582
1604
|
createdAt
|
|
1583
1605
|
comment
|
|
1606
|
+
parentId
|
|
1584
1607
|
likes
|
|
1585
1608
|
user {
|
|
1586
1609
|
id
|
|
@@ -1593,6 +1616,7 @@ exports.RE_BUILD_MARKSHEET = (0, client_1.gql) `
|
|
|
1593
1616
|
id
|
|
1594
1617
|
createdAt
|
|
1595
1618
|
comment
|
|
1619
|
+
parentId
|
|
1596
1620
|
user {
|
|
1597
1621
|
id
|
|
1598
1622
|
displayName
|
|
@@ -35,7 +35,7 @@ export interface IQuestionCommentsVar {
|
|
|
35
35
|
}
|
|
36
36
|
export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionComments'>;
|
|
37
37
|
export declare const QUESTION_COMMENT_LIKE: import("@apollo/client").DocumentNode;
|
|
38
|
-
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar) => IQuestionCommentsLikeData;
|
|
38
|
+
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar, parentId: number | null) => IQuestionCommentsLikeData;
|
|
39
39
|
export interface IQuestionCommentsLikeVar {
|
|
40
40
|
commentId: Id;
|
|
41
41
|
like: EQuestionLike;
|
|
@@ -366,15 +366,19 @@ exports.QUESTION_COMMENT_LIKE = (0, client_1.gql) `
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
`;
|
|
369
|
-
const optimisticCommentLike = (comments, input) => {
|
|
369
|
+
const optimisticCommentLike = (comments, input, parentId) => {
|
|
370
370
|
const { commentId, like } = input;
|
|
371
|
-
const
|
|
371
|
+
const topLevelComment = comments.find(({ id }) => Number(id) === Number(parentId || commentId)) ||
|
|
372
372
|
{};
|
|
373
|
+
const comment = parentId && topLevelComment.replies
|
|
374
|
+
? topLevelComment.replies.find(({ id }) => Number(id) === Number(commentId)) || {}
|
|
375
|
+
: topLevelComment;
|
|
373
376
|
return {
|
|
374
377
|
restricted: {
|
|
375
378
|
questionCommentLike: {
|
|
376
379
|
...comment,
|
|
377
|
-
|
|
380
|
+
replies: parentId ? [] : comment.replies,
|
|
381
|
+
id: Number(comment.id),
|
|
378
382
|
__typename: 'QuestionComment',
|
|
379
383
|
...(0, exports.getLikeData)(like, comment),
|
|
380
384
|
},
|
|
@@ -96,6 +96,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
96
96
|
id
|
|
97
97
|
createdAt
|
|
98
98
|
comment
|
|
99
|
+
parentId
|
|
99
100
|
likes
|
|
100
101
|
user {
|
|
101
102
|
id
|
|
@@ -108,6 +109,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
108
109
|
id
|
|
109
110
|
createdAt
|
|
110
111
|
comment
|
|
112
|
+
parentId
|
|
111
113
|
user {
|
|
112
114
|
id
|
|
113
115
|
displayName
|
|
@@ -213,6 +215,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
213
215
|
id
|
|
214
216
|
createdAt
|
|
215
217
|
comment
|
|
218
|
+
parentId
|
|
216
219
|
likes
|
|
217
220
|
user {
|
|
218
221
|
id
|
|
@@ -225,6 +228,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
225
228
|
id
|
|
226
229
|
createdAt
|
|
227
230
|
comment
|
|
231
|
+
parentId
|
|
228
232
|
user {
|
|
229
233
|
id
|
|
230
234
|
displayName
|
|
@@ -333,6 +337,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
333
337
|
id
|
|
334
338
|
createdAt
|
|
335
339
|
comment
|
|
340
|
+
parentId
|
|
336
341
|
likes
|
|
337
342
|
user {
|
|
338
343
|
id
|
|
@@ -345,6 +350,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
345
350
|
id
|
|
346
351
|
createdAt
|
|
347
352
|
comment
|
|
353
|
+
parentId
|
|
348
354
|
user {
|
|
349
355
|
id
|
|
350
356
|
displayName
|
|
@@ -450,6 +456,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
450
456
|
id
|
|
451
457
|
createdAt
|
|
452
458
|
comment
|
|
459
|
+
parentId
|
|
453
460
|
likes
|
|
454
461
|
user {
|
|
455
462
|
id
|
|
@@ -462,6 +469,7 @@ exports.MARKSHEET = (0, client_1.gql) `
|
|
|
462
469
|
id
|
|
463
470
|
createdAt
|
|
464
471
|
comment
|
|
472
|
+
parentId
|
|
465
473
|
user {
|
|
466
474
|
id
|
|
467
475
|
displayName
|
|
@@ -647,6 +655,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
647
655
|
id
|
|
648
656
|
createdAt
|
|
649
657
|
comment
|
|
658
|
+
parentId
|
|
650
659
|
likes
|
|
651
660
|
user {
|
|
652
661
|
id
|
|
@@ -659,6 +668,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
659
668
|
id
|
|
660
669
|
createdAt
|
|
661
670
|
comment
|
|
671
|
+
parentId
|
|
662
672
|
user {
|
|
663
673
|
id
|
|
664
674
|
displayName
|
|
@@ -771,6 +781,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
771
781
|
id
|
|
772
782
|
createdAt
|
|
773
783
|
comment
|
|
784
|
+
parentId
|
|
774
785
|
likes
|
|
775
786
|
user {
|
|
776
787
|
id
|
|
@@ -783,6 +794,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
783
794
|
id
|
|
784
795
|
createdAt
|
|
785
796
|
comment
|
|
797
|
+
parentId
|
|
786
798
|
user {
|
|
787
799
|
id
|
|
788
800
|
displayName
|
|
@@ -888,6 +900,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
888
900
|
id
|
|
889
901
|
createdAt
|
|
890
902
|
comment
|
|
903
|
+
parentId
|
|
891
904
|
likes
|
|
892
905
|
user {
|
|
893
906
|
id
|
|
@@ -900,6 +913,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
900
913
|
id
|
|
901
914
|
createdAt
|
|
902
915
|
comment
|
|
916
|
+
parentId
|
|
903
917
|
user {
|
|
904
918
|
id
|
|
905
919
|
displayName
|
|
@@ -1008,6 +1022,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
1008
1022
|
id
|
|
1009
1023
|
createdAt
|
|
1010
1024
|
comment
|
|
1025
|
+
parentId
|
|
1011
1026
|
likes
|
|
1012
1027
|
user {
|
|
1013
1028
|
id
|
|
@@ -1020,6 +1035,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
1020
1035
|
id
|
|
1021
1036
|
createdAt
|
|
1022
1037
|
comment
|
|
1038
|
+
parentId
|
|
1023
1039
|
user {
|
|
1024
1040
|
id
|
|
1025
1041
|
displayName
|
|
@@ -1125,6 +1141,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
1125
1141
|
id
|
|
1126
1142
|
createdAt
|
|
1127
1143
|
comment
|
|
1144
|
+
parentId
|
|
1128
1145
|
likes
|
|
1129
1146
|
user {
|
|
1130
1147
|
id
|
|
@@ -1137,6 +1154,7 @@ exports.FLAGGED_QUESTIONS = (0, client_1.gql) `
|
|
|
1137
1154
|
id
|
|
1138
1155
|
createdAt
|
|
1139
1156
|
comment
|
|
1157
|
+
parentId
|
|
1140
1158
|
user {
|
|
1141
1159
|
id
|
|
1142
1160
|
displayName
|
|
@@ -1330,6 +1348,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1330
1348
|
id
|
|
1331
1349
|
createdAt
|
|
1332
1350
|
comment
|
|
1351
|
+
parentId
|
|
1333
1352
|
likes
|
|
1334
1353
|
user {
|
|
1335
1354
|
id
|
|
@@ -1342,6 +1361,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1342
1361
|
id
|
|
1343
1362
|
createdAt
|
|
1344
1363
|
comment
|
|
1364
|
+
parentId
|
|
1345
1365
|
user {
|
|
1346
1366
|
id
|
|
1347
1367
|
displayName
|
|
@@ -1447,6 +1467,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1447
1467
|
id
|
|
1448
1468
|
createdAt
|
|
1449
1469
|
comment
|
|
1470
|
+
parentId
|
|
1450
1471
|
likes
|
|
1451
1472
|
user {
|
|
1452
1473
|
id
|
|
@@ -1459,6 +1480,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1459
1480
|
id
|
|
1460
1481
|
createdAt
|
|
1461
1482
|
comment
|
|
1483
|
+
parentId
|
|
1462
1484
|
user {
|
|
1463
1485
|
id
|
|
1464
1486
|
displayName
|
|
@@ -1567,6 +1589,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1567
1589
|
id
|
|
1568
1590
|
createdAt
|
|
1569
1591
|
comment
|
|
1592
|
+
parentId
|
|
1570
1593
|
likes
|
|
1571
1594
|
user {
|
|
1572
1595
|
id
|
|
@@ -1579,6 +1602,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1579
1602
|
id
|
|
1580
1603
|
createdAt
|
|
1581
1604
|
comment
|
|
1605
|
+
parentId
|
|
1582
1606
|
user {
|
|
1583
1607
|
id
|
|
1584
1608
|
displayName
|
|
@@ -1684,6 +1708,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1684
1708
|
id
|
|
1685
1709
|
createdAt
|
|
1686
1710
|
comment
|
|
1711
|
+
parentId
|
|
1687
1712
|
likes
|
|
1688
1713
|
user {
|
|
1689
1714
|
id
|
|
@@ -1696,6 +1721,7 @@ exports.FLAGGED_QUESTIONS_MARKSHEET = (0, client_1.gql) `
|
|
|
1696
1721
|
id
|
|
1697
1722
|
createdAt
|
|
1698
1723
|
comment
|
|
1724
|
+
parentId
|
|
1699
1725
|
user {
|
|
1700
1726
|
id
|
|
1701
1727
|
displayName
|
|
@@ -39,6 +39,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
39
39
|
id
|
|
40
40
|
createdAt
|
|
41
41
|
comment
|
|
42
|
+
parentId
|
|
42
43
|
likes
|
|
43
44
|
user {
|
|
44
45
|
id
|
|
@@ -51,6 +52,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
51
52
|
id
|
|
52
53
|
createdAt
|
|
53
54
|
comment
|
|
55
|
+
parentId
|
|
54
56
|
user {
|
|
55
57
|
id
|
|
56
58
|
displayName
|
|
@@ -156,6 +158,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
156
158
|
id
|
|
157
159
|
createdAt
|
|
158
160
|
comment
|
|
161
|
+
parentId
|
|
159
162
|
likes
|
|
160
163
|
user {
|
|
161
164
|
id
|
|
@@ -168,6 +171,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
168
171
|
id
|
|
169
172
|
createdAt
|
|
170
173
|
comment
|
|
174
|
+
parentId
|
|
171
175
|
user {
|
|
172
176
|
id
|
|
173
177
|
displayName
|
|
@@ -276,6 +280,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
276
280
|
id
|
|
277
281
|
createdAt
|
|
278
282
|
comment
|
|
283
|
+
parentId
|
|
279
284
|
likes
|
|
280
285
|
user {
|
|
281
286
|
id
|
|
@@ -288,6 +293,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
288
293
|
id
|
|
289
294
|
createdAt
|
|
290
295
|
comment
|
|
296
|
+
parentId
|
|
291
297
|
user {
|
|
292
298
|
id
|
|
293
299
|
displayName
|
|
@@ -393,6 +399,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
393
399
|
id
|
|
394
400
|
createdAt
|
|
395
401
|
comment
|
|
402
|
+
parentId
|
|
396
403
|
likes
|
|
397
404
|
user {
|
|
398
405
|
id
|
|
@@ -405,6 +412,7 @@ exports.QUESTION = (0, client_1.gql) `
|
|
|
405
412
|
id
|
|
406
413
|
createdAt
|
|
407
414
|
comment
|
|
415
|
+
parentId
|
|
408
416
|
user {
|
|
409
417
|
id
|
|
410
418
|
displayName
|
|
@@ -44,6 +44,7 @@ export const MARKSHEET_MARK_FIELDS = gql `
|
|
|
44
44
|
id
|
|
45
45
|
createdAt
|
|
46
46
|
comment
|
|
47
|
+
parentId
|
|
47
48
|
likes
|
|
48
49
|
user {
|
|
49
50
|
id
|
|
@@ -56,6 +57,7 @@ export const MARKSHEET_MARK_FIELDS = gql `
|
|
|
56
57
|
id
|
|
57
58
|
createdAt
|
|
58
59
|
comment
|
|
60
|
+
parentId
|
|
59
61
|
user {
|
|
60
62
|
id
|
|
61
63
|
displayName
|
|
@@ -88,6 +88,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
88
88
|
createdAt
|
|
89
89
|
comment
|
|
90
90
|
likes
|
|
91
|
+
parentId
|
|
91
92
|
user {
|
|
92
93
|
id
|
|
93
94
|
displayName
|
|
@@ -98,6 +99,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
98
99
|
replies {
|
|
99
100
|
id
|
|
100
101
|
createdAt
|
|
102
|
+
parentId
|
|
101
103
|
comment
|
|
102
104
|
user {
|
|
103
105
|
id
|
|
@@ -204,6 +206,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
204
206
|
id
|
|
205
207
|
createdAt
|
|
206
208
|
comment
|
|
209
|
+
parentId
|
|
207
210
|
likes
|
|
208
211
|
user {
|
|
209
212
|
id
|
|
@@ -216,6 +219,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
216
219
|
id
|
|
217
220
|
createdAt
|
|
218
221
|
comment
|
|
222
|
+
parentId
|
|
219
223
|
user {
|
|
220
224
|
id
|
|
221
225
|
displayName
|
|
@@ -324,6 +328,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
324
328
|
id
|
|
325
329
|
createdAt
|
|
326
330
|
comment
|
|
331
|
+
parentId
|
|
327
332
|
likes
|
|
328
333
|
user {
|
|
329
334
|
id
|
|
@@ -336,6 +341,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
336
341
|
id
|
|
337
342
|
createdAt
|
|
338
343
|
comment
|
|
344
|
+
parentId
|
|
339
345
|
user {
|
|
340
346
|
id
|
|
341
347
|
displayName
|
|
@@ -441,6 +447,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
441
447
|
id
|
|
442
448
|
createdAt
|
|
443
449
|
comment
|
|
450
|
+
parentId
|
|
444
451
|
likes
|
|
445
452
|
user {
|
|
446
453
|
id
|
|
@@ -453,6 +460,7 @@ export const BUILD_QUESTION_MARKSHEET = gql `
|
|
|
453
460
|
id
|
|
454
461
|
createdAt
|
|
455
462
|
comment
|
|
463
|
+
parentId
|
|
456
464
|
user {
|
|
457
465
|
id
|
|
458
466
|
displayName
|
|
@@ -653,6 +661,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
653
661
|
id
|
|
654
662
|
createdAt
|
|
655
663
|
comment
|
|
664
|
+
parentId
|
|
656
665
|
likes
|
|
657
666
|
user {
|
|
658
667
|
id
|
|
@@ -665,6 +674,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
665
674
|
id
|
|
666
675
|
createdAt
|
|
667
676
|
comment
|
|
677
|
+
parentId
|
|
668
678
|
user {
|
|
669
679
|
id
|
|
670
680
|
displayName
|
|
@@ -770,6 +780,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
770
780
|
id
|
|
771
781
|
createdAt
|
|
772
782
|
comment
|
|
783
|
+
parentId
|
|
773
784
|
likes
|
|
774
785
|
user {
|
|
775
786
|
id
|
|
@@ -782,6 +793,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
782
793
|
id
|
|
783
794
|
createdAt
|
|
784
795
|
comment
|
|
796
|
+
parentId
|
|
785
797
|
user {
|
|
786
798
|
id
|
|
787
799
|
displayName
|
|
@@ -890,6 +902,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
890
902
|
id
|
|
891
903
|
createdAt
|
|
892
904
|
comment
|
|
905
|
+
parentId
|
|
893
906
|
likes
|
|
894
907
|
user {
|
|
895
908
|
id
|
|
@@ -902,6 +915,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
902
915
|
id
|
|
903
916
|
createdAt
|
|
904
917
|
comment
|
|
918
|
+
parentId
|
|
905
919
|
user {
|
|
906
920
|
id
|
|
907
921
|
displayName
|
|
@@ -1007,6 +1021,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
1007
1021
|
id
|
|
1008
1022
|
createdAt
|
|
1009
1023
|
comment
|
|
1024
|
+
parentId
|
|
1010
1025
|
likes
|
|
1011
1026
|
user {
|
|
1012
1027
|
id
|
|
@@ -1019,6 +1034,7 @@ export const BUILD_MARKSHEET = gql `
|
|
|
1019
1034
|
id
|
|
1020
1035
|
createdAt
|
|
1021
1036
|
comment
|
|
1037
|
+
parentId
|
|
1022
1038
|
user {
|
|
1023
1039
|
id
|
|
1024
1040
|
displayName
|
|
@@ -1224,6 +1240,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1224
1240
|
id
|
|
1225
1241
|
createdAt
|
|
1226
1242
|
comment
|
|
1243
|
+
parentId
|
|
1227
1244
|
likes
|
|
1228
1245
|
user {
|
|
1229
1246
|
id
|
|
@@ -1236,6 +1253,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1236
1253
|
id
|
|
1237
1254
|
createdAt
|
|
1238
1255
|
comment
|
|
1256
|
+
parentId
|
|
1239
1257
|
user {
|
|
1240
1258
|
id
|
|
1241
1259
|
displayName
|
|
@@ -1341,6 +1359,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1341
1359
|
id
|
|
1342
1360
|
createdAt
|
|
1343
1361
|
comment
|
|
1362
|
+
parentId
|
|
1344
1363
|
likes
|
|
1345
1364
|
user {
|
|
1346
1365
|
id
|
|
@@ -1353,6 +1372,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1353
1372
|
id
|
|
1354
1373
|
createdAt
|
|
1355
1374
|
comment
|
|
1375
|
+
parentId
|
|
1356
1376
|
user {
|
|
1357
1377
|
id
|
|
1358
1378
|
displayName
|
|
@@ -1461,6 +1481,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1461
1481
|
id
|
|
1462
1482
|
createdAt
|
|
1463
1483
|
comment
|
|
1484
|
+
parentId
|
|
1464
1485
|
likes
|
|
1465
1486
|
user {
|
|
1466
1487
|
id
|
|
@@ -1473,6 +1494,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1473
1494
|
id
|
|
1474
1495
|
createdAt
|
|
1475
1496
|
comment
|
|
1497
|
+
parentId
|
|
1476
1498
|
user {
|
|
1477
1499
|
id
|
|
1478
1500
|
displayName
|
|
@@ -1578,6 +1600,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1578
1600
|
id
|
|
1579
1601
|
createdAt
|
|
1580
1602
|
comment
|
|
1603
|
+
parentId
|
|
1581
1604
|
likes
|
|
1582
1605
|
user {
|
|
1583
1606
|
id
|
|
@@ -1590,6 +1613,7 @@ export const RE_BUILD_MARKSHEET = gql `
|
|
|
1590
1613
|
id
|
|
1591
1614
|
createdAt
|
|
1592
1615
|
comment
|
|
1616
|
+
parentId
|
|
1593
1617
|
user {
|
|
1594
1618
|
id
|
|
1595
1619
|
displayName
|
|
@@ -35,7 +35,7 @@ export interface IQuestionCommentsVar {
|
|
|
35
35
|
}
|
|
36
36
|
export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionComments'>;
|
|
37
37
|
export declare const QUESTION_COMMENT_LIKE: import("@apollo/client").DocumentNode;
|
|
38
|
-
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar) => IQuestionCommentsLikeData;
|
|
38
|
+
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar, parentId: number | null) => IQuestionCommentsLikeData;
|
|
39
39
|
export interface IQuestionCommentsLikeVar {
|
|
40
40
|
commentId: Id;
|
|
41
41
|
like: EQuestionLike;
|
|
@@ -352,15 +352,19 @@ export const QUESTION_COMMENT_LIKE = gql `
|
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
`;
|
|
355
|
-
export const optimisticCommentLike = (comments, input) => {
|
|
355
|
+
export const optimisticCommentLike = (comments, input, parentId) => {
|
|
356
356
|
const { commentId, like } = input;
|
|
357
|
-
const
|
|
357
|
+
const topLevelComment = comments.find(({ id }) => Number(id) === Number(parentId || commentId)) ||
|
|
358
358
|
{};
|
|
359
|
+
const comment = parentId && topLevelComment.replies
|
|
360
|
+
? topLevelComment.replies.find(({ id }) => Number(id) === Number(commentId)) || {}
|
|
361
|
+
: topLevelComment;
|
|
359
362
|
return {
|
|
360
363
|
restricted: {
|
|
361
364
|
questionCommentLike: {
|
|
362
365
|
...comment,
|
|
363
|
-
|
|
366
|
+
replies: parentId ? [] : comment.replies,
|
|
367
|
+
id: Number(comment.id),
|
|
364
368
|
__typename: 'QuestionComment',
|
|
365
369
|
...getLikeData(like, comment),
|
|
366
370
|
},
|
|
@@ -93,6 +93,7 @@ export const MARKSHEET = gql `
|
|
|
93
93
|
id
|
|
94
94
|
createdAt
|
|
95
95
|
comment
|
|
96
|
+
parentId
|
|
96
97
|
likes
|
|
97
98
|
user {
|
|
98
99
|
id
|
|
@@ -105,6 +106,7 @@ export const MARKSHEET = gql `
|
|
|
105
106
|
id
|
|
106
107
|
createdAt
|
|
107
108
|
comment
|
|
109
|
+
parentId
|
|
108
110
|
user {
|
|
109
111
|
id
|
|
110
112
|
displayName
|
|
@@ -210,6 +212,7 @@ export const MARKSHEET = gql `
|
|
|
210
212
|
id
|
|
211
213
|
createdAt
|
|
212
214
|
comment
|
|
215
|
+
parentId
|
|
213
216
|
likes
|
|
214
217
|
user {
|
|
215
218
|
id
|
|
@@ -222,6 +225,7 @@ export const MARKSHEET = gql `
|
|
|
222
225
|
id
|
|
223
226
|
createdAt
|
|
224
227
|
comment
|
|
228
|
+
parentId
|
|
225
229
|
user {
|
|
226
230
|
id
|
|
227
231
|
displayName
|
|
@@ -330,6 +334,7 @@ export const MARKSHEET = gql `
|
|
|
330
334
|
id
|
|
331
335
|
createdAt
|
|
332
336
|
comment
|
|
337
|
+
parentId
|
|
333
338
|
likes
|
|
334
339
|
user {
|
|
335
340
|
id
|
|
@@ -342,6 +347,7 @@ export const MARKSHEET = gql `
|
|
|
342
347
|
id
|
|
343
348
|
createdAt
|
|
344
349
|
comment
|
|
350
|
+
parentId
|
|
345
351
|
user {
|
|
346
352
|
id
|
|
347
353
|
displayName
|
|
@@ -447,6 +453,7 @@ export const MARKSHEET = gql `
|
|
|
447
453
|
id
|
|
448
454
|
createdAt
|
|
449
455
|
comment
|
|
456
|
+
parentId
|
|
450
457
|
likes
|
|
451
458
|
user {
|
|
452
459
|
id
|
|
@@ -459,6 +466,7 @@ export const MARKSHEET = gql `
|
|
|
459
466
|
id
|
|
460
467
|
createdAt
|
|
461
468
|
comment
|
|
469
|
+
parentId
|
|
462
470
|
user {
|
|
463
471
|
id
|
|
464
472
|
displayName
|
|
@@ -644,6 +652,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
644
652
|
id
|
|
645
653
|
createdAt
|
|
646
654
|
comment
|
|
655
|
+
parentId
|
|
647
656
|
likes
|
|
648
657
|
user {
|
|
649
658
|
id
|
|
@@ -656,6 +665,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
656
665
|
id
|
|
657
666
|
createdAt
|
|
658
667
|
comment
|
|
668
|
+
parentId
|
|
659
669
|
user {
|
|
660
670
|
id
|
|
661
671
|
displayName
|
|
@@ -768,6 +778,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
768
778
|
id
|
|
769
779
|
createdAt
|
|
770
780
|
comment
|
|
781
|
+
parentId
|
|
771
782
|
likes
|
|
772
783
|
user {
|
|
773
784
|
id
|
|
@@ -780,6 +791,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
780
791
|
id
|
|
781
792
|
createdAt
|
|
782
793
|
comment
|
|
794
|
+
parentId
|
|
783
795
|
user {
|
|
784
796
|
id
|
|
785
797
|
displayName
|
|
@@ -885,6 +897,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
885
897
|
id
|
|
886
898
|
createdAt
|
|
887
899
|
comment
|
|
900
|
+
parentId
|
|
888
901
|
likes
|
|
889
902
|
user {
|
|
890
903
|
id
|
|
@@ -897,6 +910,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
897
910
|
id
|
|
898
911
|
createdAt
|
|
899
912
|
comment
|
|
913
|
+
parentId
|
|
900
914
|
user {
|
|
901
915
|
id
|
|
902
916
|
displayName
|
|
@@ -1005,6 +1019,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
1005
1019
|
id
|
|
1006
1020
|
createdAt
|
|
1007
1021
|
comment
|
|
1022
|
+
parentId
|
|
1008
1023
|
likes
|
|
1009
1024
|
user {
|
|
1010
1025
|
id
|
|
@@ -1017,6 +1032,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
1017
1032
|
id
|
|
1018
1033
|
createdAt
|
|
1019
1034
|
comment
|
|
1035
|
+
parentId
|
|
1020
1036
|
user {
|
|
1021
1037
|
id
|
|
1022
1038
|
displayName
|
|
@@ -1122,6 +1138,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
1122
1138
|
id
|
|
1123
1139
|
createdAt
|
|
1124
1140
|
comment
|
|
1141
|
+
parentId
|
|
1125
1142
|
likes
|
|
1126
1143
|
user {
|
|
1127
1144
|
id
|
|
@@ -1134,6 +1151,7 @@ export const FLAGGED_QUESTIONS = gql `
|
|
|
1134
1151
|
id
|
|
1135
1152
|
createdAt
|
|
1136
1153
|
comment
|
|
1154
|
+
parentId
|
|
1137
1155
|
user {
|
|
1138
1156
|
id
|
|
1139
1157
|
displayName
|
|
@@ -1327,6 +1345,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1327
1345
|
id
|
|
1328
1346
|
createdAt
|
|
1329
1347
|
comment
|
|
1348
|
+
parentId
|
|
1330
1349
|
likes
|
|
1331
1350
|
user {
|
|
1332
1351
|
id
|
|
@@ -1339,6 +1358,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1339
1358
|
id
|
|
1340
1359
|
createdAt
|
|
1341
1360
|
comment
|
|
1361
|
+
parentId
|
|
1342
1362
|
user {
|
|
1343
1363
|
id
|
|
1344
1364
|
displayName
|
|
@@ -1444,6 +1464,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1444
1464
|
id
|
|
1445
1465
|
createdAt
|
|
1446
1466
|
comment
|
|
1467
|
+
parentId
|
|
1447
1468
|
likes
|
|
1448
1469
|
user {
|
|
1449
1470
|
id
|
|
@@ -1456,6 +1477,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1456
1477
|
id
|
|
1457
1478
|
createdAt
|
|
1458
1479
|
comment
|
|
1480
|
+
parentId
|
|
1459
1481
|
user {
|
|
1460
1482
|
id
|
|
1461
1483
|
displayName
|
|
@@ -1564,6 +1586,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1564
1586
|
id
|
|
1565
1587
|
createdAt
|
|
1566
1588
|
comment
|
|
1589
|
+
parentId
|
|
1567
1590
|
likes
|
|
1568
1591
|
user {
|
|
1569
1592
|
id
|
|
@@ -1576,6 +1599,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1576
1599
|
id
|
|
1577
1600
|
createdAt
|
|
1578
1601
|
comment
|
|
1602
|
+
parentId
|
|
1579
1603
|
user {
|
|
1580
1604
|
id
|
|
1581
1605
|
displayName
|
|
@@ -1681,6 +1705,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1681
1705
|
id
|
|
1682
1706
|
createdAt
|
|
1683
1707
|
comment
|
|
1708
|
+
parentId
|
|
1684
1709
|
likes
|
|
1685
1710
|
user {
|
|
1686
1711
|
id
|
|
@@ -1693,6 +1718,7 @@ export const FLAGGED_QUESTIONS_MARKSHEET = gql `
|
|
|
1693
1718
|
id
|
|
1694
1719
|
createdAt
|
|
1695
1720
|
comment
|
|
1721
|
+
parentId
|
|
1696
1722
|
user {
|
|
1697
1723
|
id
|
|
1698
1724
|
displayName
|
|
@@ -36,6 +36,7 @@ export const QUESTION = gql `
|
|
|
36
36
|
id
|
|
37
37
|
createdAt
|
|
38
38
|
comment
|
|
39
|
+
parentId
|
|
39
40
|
likes
|
|
40
41
|
user {
|
|
41
42
|
id
|
|
@@ -48,6 +49,7 @@ export const QUESTION = gql `
|
|
|
48
49
|
id
|
|
49
50
|
createdAt
|
|
50
51
|
comment
|
|
52
|
+
parentId
|
|
51
53
|
user {
|
|
52
54
|
id
|
|
53
55
|
displayName
|
|
@@ -153,6 +155,7 @@ export const QUESTION = gql `
|
|
|
153
155
|
id
|
|
154
156
|
createdAt
|
|
155
157
|
comment
|
|
158
|
+
parentId
|
|
156
159
|
likes
|
|
157
160
|
user {
|
|
158
161
|
id
|
|
@@ -165,6 +168,7 @@ export const QUESTION = gql `
|
|
|
165
168
|
id
|
|
166
169
|
createdAt
|
|
167
170
|
comment
|
|
171
|
+
parentId
|
|
168
172
|
user {
|
|
169
173
|
id
|
|
170
174
|
displayName
|
|
@@ -273,6 +277,7 @@ export const QUESTION = gql `
|
|
|
273
277
|
id
|
|
274
278
|
createdAt
|
|
275
279
|
comment
|
|
280
|
+
parentId
|
|
276
281
|
likes
|
|
277
282
|
user {
|
|
278
283
|
id
|
|
@@ -285,6 +290,7 @@ export const QUESTION = gql `
|
|
|
285
290
|
id
|
|
286
291
|
createdAt
|
|
287
292
|
comment
|
|
293
|
+
parentId
|
|
288
294
|
user {
|
|
289
295
|
id
|
|
290
296
|
displayName
|
|
@@ -390,6 +396,7 @@ export const QUESTION = gql `
|
|
|
390
396
|
id
|
|
391
397
|
createdAt
|
|
392
398
|
comment
|
|
399
|
+
parentId
|
|
393
400
|
likes
|
|
394
401
|
user {
|
|
395
402
|
id
|
|
@@ -402,6 +409,7 @@ export const QUESTION = gql `
|
|
|
402
409
|
id
|
|
403
410
|
createdAt
|
|
404
411
|
comment
|
|
412
|
+
parentId
|
|
405
413
|
user {
|
|
406
414
|
id
|
|
407
415
|
displayName
|