Absinthe computed properties?

Fields can have their own resolve functions so you could try:

  object :person do
    field :full_name, :string do
      resolve fn person, _, _ ->
        {:ok, "#{person.first_name} #{person.last_name}"}
      end
    end
  end
query do
   field :people, type: list_of(:person) do
      resolve &PersonResolver.list/2
   end
end

docs for that:

Absinthe.Schema.Notation — absinthe v1.11.0
3 artity function

Easy to miss, most of the examples I’ve seen use 2 artity resolve