@quesmed/types 2.6.199 → 2.6.200
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.
|
@@ -79,7 +79,7 @@ export interface ISaveMarksheetInput {
|
|
|
79
79
|
* saveMarksheets
|
|
80
80
|
*/
|
|
81
81
|
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
82
|
-
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions) => void;
|
|
82
|
+
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions<ISaveMarksheetsVar>) => void;
|
|
83
83
|
export declare const optimisticSaveMarksheets: (marksheet: IMarksheet, marksheetInput: ISaveMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
84
84
|
export interface ISaveMarksheetsVar {
|
|
85
85
|
input: ISaveMarksheetInput[];
|
|
@@ -90,12 +90,12 @@ const updateMarksheets = (cache, result, options) => {
|
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
try {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
const { input } = variables;
|
|
94
|
+
for (let i = 0; i < input.length; i++) {
|
|
95
95
|
const marksheet = input[i];
|
|
96
96
|
cache.writeFragment({
|
|
97
97
|
id: cache.identify({
|
|
98
|
-
id:
|
|
98
|
+
id: marksheet.markId,
|
|
99
99
|
__typename: 'MarksheetMark',
|
|
100
100
|
}),
|
|
101
101
|
data: {
|
|
@@ -79,7 +79,7 @@ export interface ISaveMarksheetInput {
|
|
|
79
79
|
* saveMarksheets
|
|
80
80
|
*/
|
|
81
81
|
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
82
|
-
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions) => void;
|
|
82
|
+
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions<ISaveMarksheetsVar>) => void;
|
|
83
83
|
export declare const optimisticSaveMarksheets: (marksheet: IMarksheet, marksheetInput: ISaveMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
84
84
|
export interface ISaveMarksheetsVar {
|
|
85
85
|
input: ISaveMarksheetInput[];
|
|
@@ -87,12 +87,12 @@ export const updateMarksheets = (cache, result, options) => {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
const { input } = variables;
|
|
91
|
+
for (let i = 0; i < input.length; i++) {
|
|
92
92
|
const marksheet = input[i];
|
|
93
93
|
cache.writeFragment({
|
|
94
94
|
id: cache.identify({
|
|
95
|
-
id:
|
|
95
|
+
id: marksheet.markId,
|
|
96
96
|
__typename: 'MarksheetMark',
|
|
97
97
|
}),
|
|
98
98
|
data: {
|