From 555d0f20ed179968f918714b0dad198c4a62652a Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Wed, 25 Sep 2019 17:28:53 +0100 Subject: [PATCH] Cache fix for null data (#437) * Fix issue where a null data response with an error will result in cached errors * Let's still cache booleans, numbers and strings --- src/exchanges/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exchanges/cache.ts b/src/exchanges/cache.ts index 723373578f..407bfd525a 100755 --- a/src/exchanges/cache.ts +++ b/src/exchanges/cache.ts @@ -147,7 +147,7 @@ const afterQuery = ( ) => (response: OperationResult) => { const { operation, data, error } = response; - if (data === undefined) { + if (data === undefined || data === null) { return; }