Method: GraphQL::Field#prepare_lazy

Defined in:
lib/graphql/field.rb

#prepare_lazy(obj, args, ctx) ⇒ GraphQL::Execution::Lazy

Prepare a lazy value for this field. It may be then-ed and resolved later.

Returns:



308
309
310
311
312
# File 'lib/graphql/field.rb', line 308

def prepare_lazy(obj, args, ctx)
  GraphQL::Execution::Lazy.new {
    lazy_resolve(obj, args, ctx)
  }
end