AbsintheConstraints.Phase (absinthe_constraints v0.1.1)

Defines an Absinthe Document Phase that validates inputs against constraints defined by the constraints directive.

Use add_to_pipeline/2 to add this phase to your Absinthe pipeline.

Summary

Functions

Link to this function

add_to_pipeline(pipeline, opts)

Link to this function

flag_invalid(node)

@spec flag_invalid(node :: Absinthe.Blueprint.node_t()) :: Absinthe.Blueprint.node_t()
Link to this function

flag_invalid(node, flag)

@spec flag_invalid(node :: Absinthe.Blueprint.node_t(), flag :: atom()) ::
  Absinthe.Blueprint.node_t()
Link to this function

flag_invalid(node, flag, reason)

@spec flag_invalid(
  node :: Absinthe.Blueprint.node_t(),
  flag :: atom(),
  reason :: String.t()
) ::
  Absinthe.Blueprint.node_t()
Link to this function

inherit_invalid(node, children, add_flag)

Link to this function

put_flag(node, flag)