# `Ash.Info.Manifest.Generator.ResultNullability`
[🔗](https://github.com/ash-project/ash/blob/v3.27.8/lib/ash/info/manifest/generator/result_nullability.ex#L5)

Computes manifest-level `allow_nil?` (result nullability) for aggregates.

Per Ash's aggregate semantics, this is independent of the user-facing
`include_nil?` flag (which controls whether nils contribute to the aggregated
set — an *input* concern). The result nullability is determined by the
aggregate's `kind`:

  * `:count`, `:exists`, `:list` — never null. `:count` returns 0 on an empty
    relationship, `:exists` returns false, `:list` returns `[]`.
  * `:first`, `:max`, `:min`, `:sum`, `:avg` — null on an empty relationship.
  * `:custom` — preserves the aggregate's own `allow_nil?` if set; otherwise
    defaults to `true` (the safe assumption, since the callback's behavior is
    unknown).

# `for_aggregate`

```elixir
@spec for_aggregate(map()) :: boolean()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
