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: nil, key: nil) ⇒ Key
constructor
A new instance of Key.
- #to_s ⇒ Object
Constructor Details
#initialize(obj:, args:, ctx: nil, key: nil) ⇒ Key
Returns a new instance of Key.
6 7 8 9 10 11 |
# File 'lib/graphql/result_cache/key.rb', line 6 def initialize(obj:, args:, ctx: nil, key: nil) @obj = obj @args = args @ctx = ctx @key = key end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/graphql/result_cache/key.rb', line 13 def to_s @to_s ||= [ ::GraphQL::ResultCache.namespace, path_clause, args_clause, object_clause, client_hash_clause ].flatten.compact.join(':') end |