How to use the apollo-cache-inmemory.writeResultToStore function in apollo-cache-inmemory

To help you get started, we’ve selected a few apollo-cache-inmemory examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rportugal / apollo-cache-redux / src / reduxCache.ts View on Github external
public write(write: Cache.WriteOptions): void {
        const data = this.config.storeFactory(cloneDeep(;

            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,