# LibTmux.Snapshot.require_relation!/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/snapshot.ex#L274
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-snapshot-require_relation-bang-4/

```
require_relation!(snapshot, entity, relation, ids \\ :all)
@spec require_relation!(
        t(),
        LibTmux.Schema.entity_selector(),
        atom(),
        :all | [LibTmux.Ref.id()]
      ) :: :ok
```

Requires relation coverage for the requested source IDs, including known-empty relations.

The default `:all` validates the entire captured source domain. An explicit
ID list does not resolve unrelated sources or their ambiguous relationships.

See the [worked example](api-examples.html#local-graph-and-filtering).

## Parameters

- `snapshot` (`t()`)
- `entity` (`LibTmux.Schema.entity_selector()`)
- `relation` (`atom()`)
- `ids` (`:all | [LibTmux.Ref.id()]`)
  Default: `:all`.
