@quesmed/types 2.6.233 → 2.6.234
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.
|
@@ -209,34 +209,38 @@ const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, entitleme
|
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
const { conceptIds, status } = variables;
|
|
212
|
-
const entitlementIdentity = {
|
|
213
|
-
__ref: cache.identify({
|
|
214
|
-
id: entitlement,
|
|
215
|
-
__typename: 'Entitlement',
|
|
216
|
-
}),
|
|
217
|
-
};
|
|
218
212
|
conceptIds.forEach((id) => {
|
|
219
|
-
if (entitlement) {
|
|
220
|
-
cache.writeFragment({
|
|
221
|
-
id: cache.identify({
|
|
222
|
-
id: id.toString,
|
|
223
|
-
entitlement: entitlementIdentity,
|
|
224
|
-
__typename: 'Concept',
|
|
225
|
-
}),
|
|
226
|
-
data: { status },
|
|
227
|
-
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
213
|
cache.writeFragment({
|
|
231
214
|
id: cache.identify({ id, __typename: 'Concept' }),
|
|
232
215
|
data: { status },
|
|
233
216
|
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
234
217
|
});
|
|
218
|
+
cache.writeFragment({
|
|
219
|
+
id: cache.identify({
|
|
220
|
+
id: id.toString(),
|
|
221
|
+
...(entitlement && {
|
|
222
|
+
entitlement: {
|
|
223
|
+
__ref: cache.identify({
|
|
224
|
+
id: entitlement,
|
|
225
|
+
__typename: 'Entitlement',
|
|
226
|
+
}),
|
|
227
|
+
},
|
|
228
|
+
}),
|
|
229
|
+
__typename: 'Concept',
|
|
230
|
+
}),
|
|
231
|
+
data: { status },
|
|
232
|
+
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
233
|
+
});
|
|
235
234
|
});
|
|
236
235
|
const topicFragmentId = cache.identify({
|
|
237
236
|
id: topicId.toString(),
|
|
238
237
|
...(entitlement && {
|
|
239
|
-
entitlement:
|
|
238
|
+
entitlement: {
|
|
239
|
+
__ref: cache.identify({
|
|
240
|
+
id: entitlement,
|
|
241
|
+
__typename: 'Entitlement',
|
|
242
|
+
}),
|
|
243
|
+
},
|
|
240
244
|
}),
|
|
241
245
|
__typename: 'Topic',
|
|
242
246
|
});
|
|
@@ -203,34 +203,38 @@ export const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, en
|
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
const { conceptIds, status } = variables;
|
|
206
|
-
const entitlementIdentity = {
|
|
207
|
-
__ref: cache.identify({
|
|
208
|
-
id: entitlement,
|
|
209
|
-
__typename: 'Entitlement',
|
|
210
|
-
}),
|
|
211
|
-
};
|
|
212
206
|
conceptIds.forEach((id) => {
|
|
213
|
-
if (entitlement) {
|
|
214
|
-
cache.writeFragment({
|
|
215
|
-
id: cache.identify({
|
|
216
|
-
id: id.toString,
|
|
217
|
-
entitlement: entitlementIdentity,
|
|
218
|
-
__typename: 'Concept',
|
|
219
|
-
}),
|
|
220
|
-
data: { status },
|
|
221
|
-
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
207
|
cache.writeFragment({
|
|
225
208
|
id: cache.identify({ id, __typename: 'Concept' }),
|
|
226
209
|
data: { status },
|
|
227
210
|
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
228
211
|
});
|
|
212
|
+
cache.writeFragment({
|
|
213
|
+
id: cache.identify({
|
|
214
|
+
id: id.toString(),
|
|
215
|
+
...(entitlement && {
|
|
216
|
+
entitlement: {
|
|
217
|
+
__ref: cache.identify({
|
|
218
|
+
id: entitlement,
|
|
219
|
+
__typename: 'Entitlement',
|
|
220
|
+
}),
|
|
221
|
+
},
|
|
222
|
+
}),
|
|
223
|
+
__typename: 'Concept',
|
|
224
|
+
}),
|
|
225
|
+
data: { status },
|
|
226
|
+
fragment: STATUS_CONCEPT_FRAGMENT,
|
|
227
|
+
});
|
|
229
228
|
});
|
|
230
229
|
const topicFragmentId = cache.identify({
|
|
231
230
|
id: topicId.toString(),
|
|
232
231
|
...(entitlement && {
|
|
233
|
-
entitlement:
|
|
232
|
+
entitlement: {
|
|
233
|
+
__ref: cache.identify({
|
|
234
|
+
id: entitlement,
|
|
235
|
+
__typename: 'Entitlement',
|
|
236
|
+
}),
|
|
237
|
+
},
|
|
234
238
|
}),
|
|
235
239
|
__typename: 'Topic',
|
|
236
240
|
});
|