# `Selecto.Subfilter.JoinPathResolver`

Resolve relationship paths into join sequences using domain join-path configuration.

This module expects a domain configuration with a flat `joins` map keyed by
relationship paths (e.g. `"orders.customer.name"`).

# `resolve`

```elixir
@spec resolve(Selecto.Subfilter.RelationshipPath.t(), atom() | map(), atom() | nil) ::
  {:ok, Selecto.Subfilter.JoinPathResolver.JoinResolution.t()}
  | {:error, Selecto.Subfilter.Error.t()}
```

Resolve relationship path into join sequence using domain configuration.

## Parameters

- `relationship_path` - Parsed RelationshipPath struct
- `domain_name` - Domain identifier or a domain join-path config map
- `base_table` - Base table for the query (defaults to first segment of path)

## Returns

{:ok, JoinResolution.t()} | {:error, Subfilter.Error.t()}

# `resolve_multiple`

```elixir
@spec resolve_multiple(
  [Selecto.Subfilter.RelationshipPath.t()],
  atom() | map(),
  atom() | nil
) ::
  {:ok, [Selecto.Subfilter.JoinPathResolver.JoinResolution.t()]}
  | {:error, Selecto.Subfilter.Error.t()}
```

Resolve multiple relationship paths at once for compound subfilters.

This is more efficient than resolving paths individually when dealing with
compound subfilters (AND/OR operations) as it can detect and reuse common
join sequences.

# `validate_path`

```elixir
@spec validate_path(Selecto.Subfilter.RelationshipPath.t(), atom() | map()) ::
  :ok | {:error, Selecto.Subfilter.Error.t()}
```

Validate that a relationship path can be resolved with the given domain configuration.

This is useful for early validation before attempting to build queries.

---

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