# LibTmux.Snapshot.require_relation!/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/snapshot.ex#L262
- **Page:** https://libtmux.org/en/elixir/latest/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()]`)
