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



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

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

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context



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

def context
  @context
end