Given their sample code, my initial impression was that it was indeed
automatic. Looking a bit closer, there seems to be hardcoded logic
inside the DataSource (the thing I'm assuming provides getAllUserIds and
getUsernameById) to specifically fetch all ids and then all names for
those ids. So
I also do not really know Haskell (I'm sensing a trend...), that said, it
seems to me the cool part of haxl is that it can be automatic -- analagous
to if writing {{ post.author.name }} in a template caused
select_related("author") to automatically be applied to the queryset that
yielded post.
I'm not great at Haskell, either, but this looks to me to be very similar
to prefetch_related (
https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related
).
Jacob
On Wed, Jun 11, 2014 at 6:15 AM, Jonathan Slenders <
jonathan.slend...@gmail.com> wrote:
> The "select+1"