Class: GraphQL::Query::Context::Scoped

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/query/context.rb

Instance Method Summary collapse

Constructor Details

#initialize(scoped_context, path) ⇒ Scoped

Returns a new instance of Scoped.



272
273
274
275
# File 'lib/graphql/query/context.rb', line 272

def initialize(scoped_context, path)
  @path = path
  @scoped_context = scoped_context
end

Instance Method Details

#merge!(hash) ⇒ Object



277
278
279
# File 'lib/graphql/query/context.rb', line 277

def merge!(hash)
  @scoped_context.merge!(hash, at: @path)
end

#set!(key, value) ⇒ Object



281
282
283
284
# File 'lib/graphql/query/context.rb', line 281

def set!(key, value)
  @scoped_context.merge!({ key => value }, at: @path)
  nil
end