Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected createOfflineMutationOptions(
options: MutationHelperOptions): MutationOptions {
const offlineMutationOptions = createMutationOptions(options);
offlineMutationOptions.context.conflictBase = getBaseStateFromCache(
this.cache as unknown as ApolloCacheWithData,
this.config.conflictProvider,
offlineMutationOptions as unknown as MutationOptions
);
if (!offlineMutationOptions.update && this.config.mutationCacheUpdates) {
offlineMutationOptions.update = this.config.mutationCacheUpdates[offlineMutationOptions.context.operationName];
}
return offlineMutationOptions;
}
protected createOfflineMutationOptions(
options: MutationHelperOptions): MutationOptions {
const offlineMutationOptions = createMutationOptions(options);
offlineMutationOptions.context.conflictBase = getBaseStateFromCache(
this.cache as unknown as ApolloCacheWithData,
this.conflictProvider,
offlineMutationOptions as unknown as MutationOptions
);
if (!offlineMutationOptions.update && this.mutationCacheUpdates) {
offlineMutationOptions.update = this.mutationCacheUpdates[offlineMutationOptions.context.operationName];
}
return offlineMutationOptions;
}
}