Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public write(write: Cache.WriteOptions): void {
const data = this.config.storeFactory(cloneDeep(this.data.toObject()));
writeResultToStore({
dataId: write.dataId,
result: write.result,
variables: write.variables,
document: this.transformDocument(write.query),
store: data,
dataIdFromObject: this.config.dataIdFromObject,
fragmentMatcherFunction: this.config.fragmentMatcher.match,
});
this.data.replace(data.toObject());
this.broadcastWatches();
}
}