View Source Absinthe.Phase behaviour (absinthe v1.7.10)

Behaviour for Absinthe Phases.

A phase takes an Absinthe.Blueprint document and returns another blueprint document. All validation, resolution, and result building happens via phases. See Absinthe.Pipeline for information on how to run phases. See the code under this namespace for information on individual phases.

Summary

Types

result_t()

@type result_t() ::
  {:ok, any()}
  | {:jump, any(), t()}
  | {:insert, any(), t() | [t()]}
  | {:replace, any(), t() | [t()]}
  | {:error, any()}
  | {:record_phases, any(), (any(), any() -> any())}

t()

@type t() :: module()

Callbacks

run(any, any)

@callback run(any(), any()) :: result_t()

Functions

any_invalid?(nodes)

put_error(node, error)

@spec put_error(Absinthe.Blueprint.node_t(), Absinthe.Phase.Error.t()) ::
  Absinthe.Blueprint.node_t()