Similar to Rails views: ```ruby - cache_if (current_user.nil?) do ``` And [actionpack-action_caching](https://github.com/rails/actionpack-action_caching): ```ruby caches_action :show, if: -> { current_user.nil? } ``` It would be nice to be able to do something like this in graphql-cache: ```ruby field :calculated_field, Int, cache: { if: -> { current_user.nil? } } ``` Although the double-brackets might feel awkward, so it might look cleaner to do ```ruby 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)
Similar to Rails views:
And actionpack-action_caching:
It would be nice to be able to do something like this in graphql-cache:
Although the double-brackets might feel awkward, so it might look cleaner to do
(which is related to my second bullet point on #52 referring to the ability to have
cacheon its own line)