Class: GraphQL::ResultCache::Key
- Inherits:
-
Object
- Object
- GraphQL::ResultCache::Key
- Defined in:
- lib/graphql/result_cache/key.rb
Instance Method Summary collapse
-
#initialize(obj:, args:, ctx:, key: nil) ⇒ Key
constructor
A new instance of Key.
- #to_s ⇒ Object
Constructor Details
#initialize(obj:, args:, ctx:, key: nil) ⇒ Key
Returns a new instance of Key.
4 5 6 7 8 9 |
# File 'lib/graphql/result_cache/key.rb', line 4 def initialize obj:, args:, ctx:, key: nil @obj = obj @args = args @ctx = ctx @key = key end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/graphql/result_cache/key.rb', line 11 def to_s @to_s ||= [ ::GraphQL::ResultCache.namespace, path_clause, args_clause, object_clause, client_hash_clause ].flatten.compact.join(':') end |