Skip to content

Commit

Permalink
Cache fix for null data (#437)
Browse files Browse the repository at this point in the history
* Fix issue where a null data response with an error will result in cached errors

* Let's still cache booleans, numbers and strings
  • Loading branch information
andyrichardson authored Sep 25, 2019
1 parent af1ae2c commit 555d0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exchanges/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const afterQuery = (
) => (response: OperationResult) => {
const { operation, data, error } = response;

if (data === undefined) {
if (data === undefined || data === null) {
return;
}

Expand Down

0 comments on commit 555d0f2

Please sign in to comment.