module GraphQL::Compatibility::LazyExecutionSpecification::LazySchema::LazyInstrumentation
Public Class Methods
instrument(type, field)
click to toggle source
# File lib/graphql/compatibility/lazy_execution_specification/lazy_schema.rb, line 56 def self.instrument(type, field) prev_lazy_resolve = field.lazy_resolve_proc field.redefine { lazy_resolve ->(o, a, c) { result = prev_lazy_resolve.call(o, a, c) c[:lazy_instrumentation] && c[:lazy_instrumentation].push("#{type.name}.#{field.name}: #{o.value}") result } } end