# `AshNeo4j.BoltyHelper`
[🔗](https://github.com/diffo-dev/ash_neo4j/blob/v0.10.1/lib/bolty_helper.ex#L5)

AshNeo4j BoltyHelper

# `apoc_available?`

Returns `true` when the current pool (see `current_pool/0`) is connected to a
Neo4j server with **APOC** installed (#386) — useful as a deploy/start-up
healthcheck before relying on an `apoc.*` `fragment(...)`.

Unlike `cypher25?/0` / `dynamic_labels?/0` (negotiated server features), APOC is
a plugin, so this introspects the server with `SHOW PROCEDURES`. Cached in
`:persistent_term` per pool after the first call. `false` when the pool is not
started. Installing APOC is the operator's job — this only reports it.

# `apoc_available?`

APOC availability for an explicit `pool`.

# `current_pool`

The Bolty pool the data layer should use for the current process.

Defaults to the primary `Bolt` pool. Override per-process with `with_pool/2`
(or by setting `:ash_neo4j_pool` in the process dictionary) — used to route a
test's queries and capability checks to a different Neo4j server (e.g. the
Bolt 6.0 / Cypher 25 pool).

# `cypher25?`

Returns `true` when the current pool (see `current_pool/0`) is connected to a
Neo4j server that supports the `CYPHER 25` language selector (date-versioned
Neo4j ≥ 2025.06).

Read from the negotiated `policy().cypher_25` flag (bolty ≥ 0.2.0); `false`
when the pool is not started.

# `cypher25?`

Cypher 25 support for an explicit `pool`.

# `dynamic_labels?`

Returns `true` when the current pool (see `current_pool/0`) is connected to a
Neo4j server that supports dynamic labels/types (`MATCH (n:$(expr))`,
`-[r:$(expr)]->`), which landed in Neo4j 5.26.

This is the **server-feature axis**, distinct from `cypher25?/0`: dynamic
labels run under plain `CYPHER 5` and need no `CYPHER 25` selector, so a
5.26 server reports `dynamic_labels: true` but `cypher_25: false`. Read from
the negotiated `policy().dynamic_labels` flag (bolty ≥ 0.2.0); `false` when the
pool is not started.

# `dynamic_labels?`

Dynamic label/type support for an explicit `pool`.

# `is_connected`

Checks Bolty connectivity

# `policy`

Returns the negotiated `%Bolty.Policy{}` for the current pool (see
`current_pool/0`), or `nil` when that pool is not started. Cached per pool in
`:persistent_term` after the first call.

# `policy`

Returns the `%Bolty.Policy{}` for an explicit `pool`, or `nil` when not started.

# `start`

Starts Bolty, returns :ok or {:error, error}

# `start`

Starts Bolty with config, returns :ok or {:error, error}

# `start_bolt6`

Starts the Bolt6 pool (Neo4j 2026.05, Bolt 6.0). Returns :ok, {:error, error},
or {:error, :not_configured} when no Bolt6 config is present.

# `start_bolt_apoc`

Starts the BoltApoc pool (Neo4j 5.x Community + APOC, #386). Returns :ok,
{:error, error}, or {:error, :not_configured} when no BoltApoc config is present.

# `with_pool`

Runs `fun` with the data-layer pool overridden to `pool` for the current
process, restoring the previous value afterwards. Query execution and the
`policy/0` / `cypher25?/0` capability checks all follow the override.

---

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