# LibTmux.Snapshot.related/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/snapshot.ex#L285
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-snapshot-related-4/

```
related(snapshot, entity, id, relation)
@spec related(
        t(),
        LibTmux.Schema.entity_selector(),
        LibTmux.Ref.id(),
        atom()
      ) ::
        LibTmux.Schema.observation()
        | nil
        | [LibTmux.Schema.observation()]
```

Resolves one source's covered relation through captured indexes; never refreshes.

Ambiguity in another source does not affect this lookup. Whole-selection
filtering still validates its entire required relationship domain first.

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

## Parameters

- `snapshot` (`t()`)
- `entity` (`LibTmux.Schema.entity_selector()`)
- `id` (`LibTmux.Ref.id()`)
- `relation` (`atom()`)
