lib/rails/graphql/request.rb
# A little helper to report an error on a given node
A little helper to report an error on a given node
A little helper to report an error on a given node
def report_node_error(message, node, **xargs)
        node = node.instance_variable_get(:@node) if node.is_a?(Request::Component)
        location = GraphQL::Native.get_location(node)
        xargs[:locations] ||= location.to_errors unless xargs.key?(:line)
        report_error(message, **xargs)
      end
def report_node_error ( message , node , ** xargs ) node = node . instance_variable_get ( :@node ) if node . is_a? ( Request :: Component ) location = GraphQL :: Native . get_location ( node ) xargs [ :locations ] ||= location . to_errors unless xargs . key? ( :line ) report_error ( message , ** xargs ) end
A little helper to report an error on a given node
A little helper to report an error on a given node
message
node
xargs