hero {
name
friends {
name
}
}
select
(select name from people as p where p.id = h.id) as name,
array(select
(select name from people as p2 where p2.id = hf.friend_id) as name
from hero_friends as hf
where hf.hero_id = h.id
) as friends
from heroes as h;