diff --git a/src/cache/inmemory/inMemoryCache.ts b/src/cache/inmemory/inMemoryCache.ts index 48fb6dc4107..d085e83bdd3 100644 --- a/src/cache/inmemory/inMemoryCache.ts +++ b/src/cache/inmemory/inMemoryCache.ts @@ -3,6 +3,7 @@ import './fixPolyfills'; import { DocumentNode } from 'graphql'; import { OptimisticWrapperFunction, wrap } from 'optimism'; +import { equal } from '@wry/equality'; import { ApolloCache, BatchOptions } from '../core/cache'; import { Cache } from '../core/types/Cache'; @@ -499,7 +500,7 @@ export class InMemoryCache extends ApolloCache { } } - if (!lastDiff || lastDiff.result !== diff.result) { + if (!lastDiff || !equal(lastDiff.result, diff.result)) { c.callback(c.lastDiff = diff, lastDiff); } }