Method: GraphQL::Cache::Key#initialize
- Defined in:
- lib/graphql/cache/key.rb
#initialize(obj, args, type, field) ⇒ Key
Initializes a new Key with the given graphql query context
27 28 29 30 31 32 33 34 35 |
# File 'lib/graphql/cache/key.rb', line 27 def initialize(obj, args, type, field) @object = obj.object @arguments = args @type = type @field = field @metadata = field.[:cache] @metadata = { cache: @metadata } unless @metadata.is_a?(Hash) end |