Skip to content

Commit 87cddfb

Browse files
committed
Update fragment.rb
1 parent 802c809 commit 87cddfb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/graphql/fragment_cache/fragment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def read_from_context
7575
end
7676

7777
def value_from_cache
78+
return nil unless FragmentCache.cache_store.exist?(cache_key)
79+
7880
FragmentCache.cache_store.read(cache_key).tap do |cached|
7981
return NIL_IN_CACHE if cached.nil? && FragmentCache.cache_store.exist?(cache_key)
8082
end

0 commit comments

Comments
 (0)