# `Ash.Info.Manifest.Relationship`
[🔗](https://github.com/ash-project/ash/blob/v3.25.2/lib/ash/info/manifest/relationship.ex#L5)

Represents a resource relationship in the API specification.

`filterable?` / `sortable?` say *whether* the relationship participates in
filter/sort inputs. The *shape* of the operation (dot-traversal vs.
existential quantifier, single-record sort vs. none) is derivable from
`cardinality`: `:one` relationships can be dot-traversed and sorted by;
`:many` relationships need an `exists`-style predicate for filters and have
no well-defined whole-set ordering for sorts.

# `relationship_type`

```elixir
@type relationship_type() :: :has_many | :has_one | :belongs_to | :many_to_many
```

# `t`

```elixir
@type t() :: %Ash.Info.Manifest.Relationship{
  allow_nil?: boolean(),
  cardinality: :one | :many,
  custom: map(),
  description: String.t() | nil,
  destination: atom(),
  filterable?: boolean(),
  name: atom(),
  sortable?: boolean(),
  type: relationship_type()
}
```

---

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