From 38d3588272e1ebf45508ac606f5a51a92d95f6a2 Mon Sep 17 00:00:00 2001 From: micimize Date: Tue, 28 May 2019 00:56:36 -0500 Subject: [PATCH] fix(cache): don't use super.read in denormalizedRead so OptimisticCache overrides it's behavior --- packages/graphql/lib/src/cache/normalized_in_memory.dart | 2 +- packages/graphql/lib/src/core/observable_query.dart | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/graphql/lib/src/cache/normalized_in_memory.dart b/packages/graphql/lib/src/cache/normalized_in_memory.dart index 642f9b15a..29813b8a7 100644 --- a/packages/graphql/lib/src/cache/normalized_in_memory.dart +++ b/packages/graphql/lib/src/cache/normalized_in_memory.dart @@ -65,7 +65,7 @@ class NormalizedInMemoryCache extends InMemoryCache { /// *WARNING* if your system allows cyclical references, this will break dynamic denormalizedRead(String key) { try { - return Traversal(_denormalizingDereference).traverse(super.read(key)); + return Traversal(_denormalizingDereference).traverse(read(key)); } catch (error) { if (error is StackOverflowError) { throw NormalizationException( diff --git a/packages/graphql/lib/src/core/observable_query.dart b/packages/graphql/lib/src/core/observable_query.dart index ec3bd99f0..4d450afd6 100644 --- a/packages/graphql/lib/src/core/observable_query.dart +++ b/packages/graphql/lib/src/core/observable_query.dart @@ -17,7 +17,6 @@ enum QueryLifecycle { SIDE_EFFECTS_PENDING, SIDE_EFFECTS_BLOCKING, - // right now only Mutations ever become completed COMPLETED, CLOSED }