module GraphQL::Field::Resolve
def create_proc(field)
-
(Proc)
- A resolver for this field, based on its config
Parameters:
-
field
(GraphQL::Field
) -- A field that needs a resolve proc
def create_proc(field) if field.property MethodResolve.new(field.property.to_sym) elsif !field.hash_key.nil? HashKeyResolve.new(field.hash_key) else NameResolve.new(field) end end