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

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

Overview

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

Returns a new instance of TimeoutQueryProxy


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

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

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context


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

def context
  @context
end