I was playing with this gem and found out that:
# user object type
field :posts, !types[!PostType] do
preload :posts
end
# is the same as
field :posts, !types[!PostType], preload: :posts
It would be cool to be able to do a simple preload: true as an option, and it would resolve to the field's name:
field :posts, !types[!PostType], preload: true
# would resolve to
field :posts, !types[!PostType], preload: :posts
So you would need to give an explicit argument if the relation name does not match the field's name or if you want more than a single relation preload.
What do you think? I could try to add this feature if I am not the only one finding it relevant.