class GraphQL::Field::Resolve::MethodResolve
Resolve the field by `public_send`ing `@method_name`
Public Class Methods
new(field)
click to toggle source
# File lib/graphql/field/resolve.rb, line 25 def initialize(field) @method_name = field.property.to_sym end
Public Instance Methods
call(obj, args, ctx)
click to toggle source
# File lib/graphql/field/resolve.rb, line 29 def call(obj, args, ctx) obj.public_send(@method_name) end