@quesmed/types-rn 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.
package/package.json
CHANGED
|
@@ -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
|
});
|