Squidie.GraphMutation.Limits (squidie v0.3.7)

Copy Markdown View Source

Explicit host-owned limits for graph mutation batches and active run graphs.

Squidie defines the contract but does not choose defaults for host applications.

Summary

Functions

Normalizes a complete atom- or string-keyed limit map.

Converts graph mutation limits to a plain map.

Types

normalize_error()

@type normalize_error() ::
  {:invalid_graph_mutation_limits,
   {atom() | String.t(), :invalid | :unsupported}}

t()

@type t() :: %Squidie.GraphMutation.Limits{
  max_active_edges_per_run: pos_integer(),
  max_active_nodes_per_run: pos_integer(),
  max_edges_per_mutation: pos_integer(),
  max_nodes_per_mutation: pos_integer()
}

Functions

normalize(attrs)

@spec normalize(term()) :: {:ok, t()} | {:error, normalize_error()}

Normalizes a complete atom- or string-keyed limit map.

to_map(limits)

@spec to_map(t()) :: map()

Converts graph mutation limits to a plain map.