@quesmed/types 2.3.0 → 2.3.2
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/mutation/restricted/questionDiscussion.d.ts +4 -4
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +13 -5
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +4 -4
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +13 -5
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export declare const getQuestionTypeName: (typeId: EQuestionType) => string;
|
|
|
16
16
|
export declare const QUESTION_LIKE: DocumentNode;
|
|
17
17
|
export declare const optimisticQuestionLike: (input: IQuestionLikeVar, question: IQuestion) => IQuestionLikeData;
|
|
18
18
|
export interface IQuestionLikeVar {
|
|
19
|
-
marksheetId
|
|
19
|
+
marksheetId?: Id;
|
|
20
20
|
questionId: Id;
|
|
21
21
|
like: EQuestionLike;
|
|
22
22
|
}
|
|
@@ -28,7 +28,7 @@ export declare const optimisticQuestionComment: (id: number, user: {
|
|
|
28
28
|
displayName: string;
|
|
29
29
|
}, input: IQuestionCommentsVar) => IQuestionCommentsData;
|
|
30
30
|
export interface IQuestionCommentsVar {
|
|
31
|
-
marksheetId
|
|
31
|
+
marksheetId?: Id;
|
|
32
32
|
questionId: Id;
|
|
33
33
|
parentId?: Id;
|
|
34
34
|
comment: string;
|
|
@@ -37,7 +37,7 @@ export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQ
|
|
|
37
37
|
export declare const QUESTION_COMMENT_LIKE: DocumentNode;
|
|
38
38
|
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar, parentId: number | null) => IQuestionCommentsLikeData;
|
|
39
39
|
export interface IQuestionCommentsLikeVar {
|
|
40
|
-
marksheetId
|
|
40
|
+
marksheetId?: Id;
|
|
41
41
|
commentId: Id;
|
|
42
42
|
like: EQuestionLike;
|
|
43
43
|
}
|
|
@@ -46,7 +46,7 @@ export declare const QUESTION_COMMENT_REMOVE: DocumentNode;
|
|
|
46
46
|
export declare const updateQuestionCommentsRemove: (typeId: EQuestionType) => (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IQuestionCommentRemoveData>, options: ApolloUpdateOptions) => void;
|
|
47
47
|
export declare const optimisticQuestionCommentRemove: (comments: IQuestionComment[], input: IQuestionCommentRemoveVar, parentId?: number | undefined) => IQuestionCommentRemoveData;
|
|
48
48
|
export interface IQuestionCommentRemoveVar {
|
|
49
|
-
marksheetId
|
|
49
|
+
marksheetId?: Id;
|
|
50
50
|
commentId: Id;
|
|
51
51
|
}
|
|
52
52
|
export declare type IQuestionCommentRemoveData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionCommentRemove'>;
|
|
@@ -227,7 +227,7 @@ const removeCommnetFromDiscussion = (comments, commentId, parentId) => {
|
|
|
227
227
|
return comments.filter(({ id }) => Number(id) !== Number(commentId));
|
|
228
228
|
};
|
|
229
229
|
exports.QUESTION_LIKE = (0, client_1.gql) `
|
|
230
|
-
mutation QuestionLike($marksheetId: Int
|
|
230
|
+
mutation QuestionLike($marksheetId: Int, $questionId: Int!, $like: Int!) {
|
|
231
231
|
restricted {
|
|
232
232
|
questionLike(
|
|
233
233
|
marksheetId: $marksheetId
|
|
@@ -257,7 +257,7 @@ const optimisticQuestionLike = (input, question) => {
|
|
|
257
257
|
exports.optimisticQuestionLike = optimisticQuestionLike;
|
|
258
258
|
exports.QUESTION_COMMENTS = (0, client_1.gql) `
|
|
259
259
|
mutation QuestionComments(
|
|
260
|
-
$marksheetId: Int
|
|
260
|
+
$marksheetId: Int
|
|
261
261
|
$questionId: Int!
|
|
262
262
|
$parentId: Int
|
|
263
263
|
$comment: String!
|
|
@@ -361,7 +361,7 @@ const optimisticQuestionComment = (id, user, input) => {
|
|
|
361
361
|
exports.optimisticQuestionComment = optimisticQuestionComment;
|
|
362
362
|
exports.QUESTION_COMMENT_LIKE = (0, client_1.gql) `
|
|
363
363
|
mutation QuestionCommentLike(
|
|
364
|
-
$marksheetId: Int
|
|
364
|
+
$marksheetId: Int
|
|
365
365
|
$commentId: Int!
|
|
366
366
|
$like: Int!
|
|
367
367
|
) {
|
|
@@ -422,9 +422,17 @@ const optimisticCommentLike = (comments, input, parentId) => {
|
|
|
422
422
|
};
|
|
423
423
|
exports.optimisticCommentLike = optimisticCommentLike;
|
|
424
424
|
exports.QUESTION_COMMENT_REMOVE = (0, client_1.gql) `
|
|
425
|
-
mutation QuestionCommentRemove(
|
|
425
|
+
mutation QuestionCommentRemove(
|
|
426
|
+
$marksheetId: Int
|
|
427
|
+
$questionId: Int!
|
|
428
|
+
$commentId: Int!
|
|
429
|
+
) {
|
|
426
430
|
restricted {
|
|
427
|
-
questionCommentRemove(
|
|
431
|
+
questionCommentRemove(
|
|
432
|
+
marksheetId: $marksheetId
|
|
433
|
+
questionId: $questionId
|
|
434
|
+
commentId: $commentId
|
|
435
|
+
) {
|
|
428
436
|
id
|
|
429
437
|
createdAt
|
|
430
438
|
comment
|
|
@@ -16,7 +16,7 @@ export declare const getQuestionTypeName: (typeId: EQuestionType) => string;
|
|
|
16
16
|
export declare const QUESTION_LIKE: DocumentNode;
|
|
17
17
|
export declare const optimisticQuestionLike: (input: IQuestionLikeVar, question: IQuestion) => IQuestionLikeData;
|
|
18
18
|
export interface IQuestionLikeVar {
|
|
19
|
-
marksheetId
|
|
19
|
+
marksheetId?: Id;
|
|
20
20
|
questionId: Id;
|
|
21
21
|
like: EQuestionLike;
|
|
22
22
|
}
|
|
@@ -28,7 +28,7 @@ export declare const optimisticQuestionComment: (id: number, user: {
|
|
|
28
28
|
displayName: string;
|
|
29
29
|
}, input: IQuestionCommentsVar) => IQuestionCommentsData;
|
|
30
30
|
export interface IQuestionCommentsVar {
|
|
31
|
-
marksheetId
|
|
31
|
+
marksheetId?: Id;
|
|
32
32
|
questionId: Id;
|
|
33
33
|
parentId?: Id;
|
|
34
34
|
comment: string;
|
|
@@ -37,7 +37,7 @@ export declare type IQuestionCommentsData = RestrictedData<graphqlNormalize & IQ
|
|
|
37
37
|
export declare const QUESTION_COMMENT_LIKE: DocumentNode;
|
|
38
38
|
export declare const optimisticCommentLike: (comments: IQuestionComment[], input: IQuestionCommentsLikeVar, parentId: number | null) => IQuestionCommentsLikeData;
|
|
39
39
|
export interface IQuestionCommentsLikeVar {
|
|
40
|
-
marksheetId
|
|
40
|
+
marksheetId?: Id;
|
|
41
41
|
commentId: Id;
|
|
42
42
|
like: EQuestionLike;
|
|
43
43
|
}
|
|
@@ -46,7 +46,7 @@ export declare const QUESTION_COMMENT_REMOVE: DocumentNode;
|
|
|
46
46
|
export declare const updateQuestionCommentsRemove: (typeId: EQuestionType) => (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IQuestionCommentRemoveData>, options: ApolloUpdateOptions) => void;
|
|
47
47
|
export declare const optimisticQuestionCommentRemove: (comments: IQuestionComment[], input: IQuestionCommentRemoveVar, parentId?: number | undefined) => IQuestionCommentRemoveData;
|
|
48
48
|
export interface IQuestionCommentRemoveVar {
|
|
49
|
-
marksheetId
|
|
49
|
+
marksheetId?: Id;
|
|
50
50
|
commentId: Id;
|
|
51
51
|
}
|
|
52
52
|
export declare type IQuestionCommentRemoveData = RestrictedData<graphqlNormalize & IQuestionComment, 'questionCommentRemove'>;
|
|
@@ -222,7 +222,7 @@ const removeCommnetFromDiscussion = (comments, commentId, parentId) => {
|
|
|
222
222
|
return comments.filter(({ id }) => Number(id) !== Number(commentId));
|
|
223
223
|
};
|
|
224
224
|
export const QUESTION_LIKE = gql `
|
|
225
|
-
mutation QuestionLike($marksheetId: Int
|
|
225
|
+
mutation QuestionLike($marksheetId: Int, $questionId: Int!, $like: Int!) {
|
|
226
226
|
restricted {
|
|
227
227
|
questionLike(
|
|
228
228
|
marksheetId: $marksheetId
|
|
@@ -251,7 +251,7 @@ export const optimisticQuestionLike = (input, question) => {
|
|
|
251
251
|
};
|
|
252
252
|
export const QUESTION_COMMENTS = gql `
|
|
253
253
|
mutation QuestionComments(
|
|
254
|
-
$marksheetId: Int
|
|
254
|
+
$marksheetId: Int
|
|
255
255
|
$questionId: Int!
|
|
256
256
|
$parentId: Int
|
|
257
257
|
$comment: String!
|
|
@@ -353,7 +353,7 @@ export const optimisticQuestionComment = (id, user, input) => {
|
|
|
353
353
|
};
|
|
354
354
|
export const QUESTION_COMMENT_LIKE = gql `
|
|
355
355
|
mutation QuestionCommentLike(
|
|
356
|
-
$marksheetId: Int
|
|
356
|
+
$marksheetId: Int
|
|
357
357
|
$commentId: Int!
|
|
358
358
|
$like: Int!
|
|
359
359
|
) {
|
|
@@ -413,9 +413,17 @@ export const optimisticCommentLike = (comments, input, parentId) => {
|
|
|
413
413
|
};
|
|
414
414
|
};
|
|
415
415
|
export const QUESTION_COMMENT_REMOVE = gql `
|
|
416
|
-
mutation QuestionCommentRemove(
|
|
416
|
+
mutation QuestionCommentRemove(
|
|
417
|
+
$marksheetId: Int
|
|
418
|
+
$questionId: Int!
|
|
419
|
+
$commentId: Int!
|
|
420
|
+
) {
|
|
417
421
|
restricted {
|
|
418
|
-
questionCommentRemove(
|
|
422
|
+
questionCommentRemove(
|
|
423
|
+
marksheetId: $marksheetId
|
|
424
|
+
questionId: $questionId
|
|
425
|
+
commentId: $commentId
|
|
426
|
+
) {
|
|
419
427
|
id
|
|
420
428
|
createdAt
|
|
421
429
|
comment
|