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.



274
275
276
277
# File 'lib/graphql/query/context.rb', line 274

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

Instance Method Details

#merge!(hash) ⇒ Object



279
280
281
# File 'lib/graphql/query/context.rb', line 279

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

#set!(key, value) ⇒ Object



283
284
285
286
# File 'lib/graphql/query/context.rb', line 283

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