Ash FrameworkAF
Ash Framework9mo ago
29 replies
smelly

Return only selected fields

How do i return only the selected fields instead of the whole struct? Cant seem to find a good example for the action based version
read :select_specific_fields do
  prepare build(
    select: [:id, :name]
  )

  pagination do
    default_limit 50
    offset? true
    countable true
  end
end
Was this page helpful?