Class: GraphQL::Schema::TimeoutMiddleware::TimeoutQueryProxy Private

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/graphql/schema/timeout_middleware.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This behaves like Query but #context returns the field-level context, not the query-level context. This means you can reliably get the irep_node and path from it after the fact.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query, ctx) ⇒ TimeoutQueryProxy

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TimeoutQueryProxy



63
64
65
66
# File 'lib/graphql/schema/timeout_middleware.rb', line 63

def initialize(query, ctx)
  @context = ctx
  super(query)
end

Instance Attribute Details

#contextObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



68
69
70
# File 'lib/graphql/schema/timeout_middleware.rb', line 68

def context
  @context
end