# `PgFlowDashboard.Queries.Flows`
[🔗](https://github.com/agoodway/pgflow/blob/v0.1.0/lib/pgflow_dashboard/queries/flows.ex#L1)

Database queries for flow-related data.

# `count_flows`

```elixir
@spec count_flows(module()) :: integer()
```

Counts all flows.

# `get_flow_with_graph`

```elixir
@spec get_flow_with_graph(module(), String.t()) ::
  {:ok, map()} | {:error, :not_found | term()}
```

Gets a flow with its dependency graph.

# `get_run_history_grid`

```elixir
@spec get_run_history_grid(module(), String.t(), keyword()) :: map()
```

Gets run history data for a GitHub-style activity grid.

Returns a map with steps as keys and lists of run results as values.

# `list_flows`

```elixir
@spec list_flows(
  module(),
  keyword()
) :: [map()]
```

Lists flows with statistics.

## Options
  * `:limit` - Maximum number of flows to return
  * `:cursor` - Cursor for pagination (flow_slug to start after)

---

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