graphql_rails
graphql_rails copied to clipboard
"render" in before_action should prevent other actions
class SomeConrtoller < GraphqlRails::Controller
before_action :render_error
action(:my_action).returns('String')
def my_action
puts "my action"
end
def render_error
render(errors: ['error'])
end
end
this code renders ['error']
and also prints "my action".
I would expect only ['error']
without printing "my action"