This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Description
Similar to Rails views:
- cache_if (current_user.nil?) do
And actionpack-action_caching:
caches_action :show, if: -> { current_user.nil? }
It would be nice to be able to do something like this in graphql-cache:
field :calculated_field, Int, cache: { if: -> { current_user.nil? } }
Although the double-brackets might feel awkward, so it might look cleaner to do
field :calculated_field, Int do
cache if: -> { current_user.nil? }
end
(which is related to my second bullet point on #52 referring to the ability to have cache on its own line)