Skip to content

Commit

Permalink
Support any number of named arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hartnell committed Dec 19, 2024
1 parent 11c1228 commit bfba37b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/graphql/fragment_cache/fragment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def read_multi(fragments)
)
end
rescue
# Allow cache_lookup_event to fail when we do not have the data we need
# Allow cache_lookup_event to fail when we do not have all of the requested attributes
end

# Fragmenst without values or with renew_cache: true in their context will have nil values like the read method
Expand Down Expand Up @@ -101,7 +101,7 @@ def final_value
@final_value ||= context.query.result["data"]
end

def cache_lookup_event(cache_key, operation_name, path, cache_hit)
def cache_lookup_event(**args)
# This method can be implemented in your application
# This provides a mechanism to monitor cache hits for a fragment
end
Expand Down

0 comments on commit bfba37b

Please sign in to comment.