diff --git a/lib/graphql/fragment_cache/fragment.rb b/lib/graphql/fragment_cache/fragment.rb index c45b093..153b702 100644 --- a/lib/graphql/fragment_cache/fragment.rb +++ b/lib/graphql/fragment_cache/fragment.rb @@ -87,6 +87,8 @@ def read_from_context end def value_from_cache + return nil unless FragmentCache.cache_store.exist?(cache_key) + FragmentCache.cache_store.read(cache_key).tap do |cached| return NIL_IN_CACHE if cached.nil? && FragmentCache.cache_store.exist?(cache_key) end