lib/rails/graphql/request/component/operation.rb
def check_invalid_operation!
            if request.operations.key?(nil)
              invalidate!

              request.report_node_error(<<~MSG.squish, @node)
                Unable to process the operation #{display_name} when the document
                contain multiple anonymous operations.
              MSG
            elsif request.operations.key?(name)
              invalidate!

              other_node = request.operations[name].instance_variable_get(:@node)
              location = GraphQL::Native.get_location(other_node)

              request.report_node_error(<<~MSG.squish, @node)
                Duplicated operation named "#{name}" defined on
                line #{location.begin_line}:#{location.begin_column}.
              MSG
            end
          end
# If there is another operation with the same name already defined,
# raise an error. If an anonymous was started, then any other
# operatios is invalid.
If there is another operation with the same name already defined,
raise an error. If an anonymous was started, then any other
operatios is invalid.
If there is another operation with the same name already defined raise an error . If an anonymous was started then any other operatios is invalid .
def check_invalid_operation!
            if request.operations.key?(nil)
              invalidate!
              request.report_node_error(<<~MSG.squish, @node)
                Unable to process the operation #{display_name} when the document
                contain multiple anonymous operations.
              MSG
            elsif request.operations.key?(name)
              invalidate!
              other_node = request.operations[name].instance_variable_get(:@node)
              location = GraphQL::Native.get_location(other_node)
              request.report_node_error(<<~MSG.squish, @node)
                Duplicated operation named "#{name}" defined on
                line #{location.begin_line}:#{location.begin_column}.
              MSG
            end
          end
def check_invalid_operation! if request . operations . key? ( nil ) invalidate! request . report_node_error ( <<~MSG . squish , @node ) 
                Unable to process the operation  #{ display_name }  when the document
                contain multiple anonymous operations.
               MSG elsif request . operations . key? ( name ) invalidate! other_node = request . operations [ name ] . instance_variable_get ( :@node ) location = GraphQL :: Native . get_location ( other_node ) request . report_node_error ( <<~MSG . squish , @node ) 
                Duplicated operation named " #{ name } " defined on
                line  #{ location . begin_line } : #{ location . begin_column } .
               MSG end end
If there is another operation with the same name already defined,
raise an error.
If there is another operation with the same name already defined raise an error .