Schemer.Node (schemer v0.1.0)

The node of the schema.

resolve

resolve

The resolve_fun of the node.

returns

Returns:

  • {:ok, value}Returns a executed value.
  • {:ok, value, resolution}: The third element will overwrite the current resolution, you can overwrite context and others in this way.
  • {:error, error}: This will halt resolution immediately.

Link to this section Summary

Link to this section Types

@type node_type() :: :root | :normal | :leaf | :leaf_like
Link to this type

resolve_fun()

@type t() :: %Schemer.Node{
  name: String.t(),
  nodes: [t()],
  resolve:
    (resolve_fun()
     | %{required(Schemer.Resolution.resolve_name()) => resolve_fun()})
    | nil,
  type: node_type()
}