Sha256: a199f6419fd509043a91cfdb9fdf1c09d4282f87bda1137b25b65dca9061f5bf
Contents?: true
Size: 380 Bytes
Versions: 10
Compression:
Stored size: 380 Bytes
Contents
module GraphitiGql module Loaders class HasMany < Many def assign(parent_records, proxy) records = proxy.data map = records.group_by { |record| record.send(@sideload.foreign_key) } parent_records.each do |pr| data = [map[pr.send(@sideload.primary_key)] || [], proxy] fulfill(pr, data) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems