lib/graphql/groups/result_transformer.rb
# TODO: Merge transform aggregate and transform attribute
Merge transform aggregate and transform attribute
Merge transform aggregate and transform attribute
def transform_aggregate(key, aggregate, result)
        result.each_with_object({}) do |(keys, value), object|
          with_zipped = build_keys(key, keys)
          with_zipped.append(aggregate)
          hash = with_zipped.reverse.inject(value) { |a, n| { n => a } }
          object.deep_merge!(hash)
        end
      end
def transform_aggregate ( key , aggregate , result ) result . each_with_object ( { } ) do | ( keys , value ) , object | with_zipped = build_keys ( key , keys ) with_zipped . append ( aggregate ) hash = with_zipped . reverse . inject ( value ) { | a , n | { n => a } } object . deep_merge! ( hash ) end end
TODO: Merge transform aggregate and transform attribute
TODO : Merge transform aggregate and transform attribute
key
<not_specific>
aggregate
<not_specific>
result
<not_specific>