lib/rails/graphql/collectors/json_collector.rb
# Add the given +value+ to the given +key+. Ensure to encode the value
# before calling this function.
Add the given +value+ to the given +key+. Ensure to encode the value
before calling this function.
Add the given + value + to the given + key + . Ensure to encode the value before calling this function .
def add(key, value)
          (@current_value << ',') unless @current_value.blank?
          if @current_array
            @current_value << value
          else
            @current_value << '"'
            @current_value << key.to_s
            @current_value << '":'
            @current_value << value.to_s
          end
        end
def add ( key , value ) ( @current_value << ',' ) unless @current_value . blank? if @current_array @current_value << value else @current_value << '"' @current_value << key . to_s @current_value << '":' @current_value << value . to_s end end
Add the given +value+ to the given +key+.
Add the given + value + to the given + key + .
key
value