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.



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

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

Instance Attribute Details

#contextObject (readonly)



71
72
73
# File 'lib/graphql/schema/timeout_middleware.rb', line 71

def context
  @context
end