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



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)

Returns the value of attribute context



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

def context
  @context
end