diff --git a/.changeset/silly-pigs-return.md b/.changeset/silly-pigs-return.md new file mode 100644 index 0000000000..38d51ccd7f --- /dev/null +++ b/.changeset/silly-pigs-return.md @@ -0,0 +1,5 @@ +--- +'@urql/core': patch +--- + +Add back our cache-outcome on the document-cache, this was behind a development flag however in our normalized cache we always add it already diff --git a/packages/core/src/exchanges/cache.ts b/packages/core/src/exchanges/cache.ts index 31b9202f2b..b3f53ebef6 100755 --- a/packages/core/src/exchanges/cache.ts +++ b/packages/core/src/exchanges/cache.ts @@ -86,14 +86,12 @@ export const cacheExchange: Exchange = ({ forward, client, dispatchDebug }) => { data: null, }); - if (process.env.NODE_ENV !== 'production') { - result = { - ...result, - operation: addMetadata(operation, { - cacheOutcome: cachedResult ? 'hit' : 'miss', - }), - }; - } + result = { + ...result, + operation: addMetadata(operation, { + cacheOutcome: cachedResult ? 'hit' : 'miss', + }), + }; if (operation.context.requestPolicy === 'cache-and-network') { result.stale = true;