absinthe v1.2.0-alpha.1 Absinthe.Phase.Document.Arguments.Data

Populate all arguments in the document with their provided data values:

  • If valid data is available for an argument, set the Argument.t’s data_value field to that value.
  • If no valid data is available for an argument, set the Argument.t’s data_value to nil.
  • When determining the value of the argument, mark any invalid nodes in the Argument.t’s normalized_value tree with :invalid and a reason.
  • If non-null arguments are not provided (eg, a Argument.t is missing from normalized_value), add a stub Argument.t and flag it as :invalid and :missing.
  • If non-null input fields are not provided (eg, an Input.Field.t is missing from normalized_value), add a stub Input.Field.t and flag it as :invalid and :missing.

Note that the limited validation that occurs in this phase is limited to setting the data_value to nil, adding flags to the normalized_value, and building stub fields/arguments when missing values are required. Actual addition of errors is handled by validation phases.

Summary

Functions

any_invalid?(nodes)
flag_invalid(node)

Specs

flag_invalid(Blueprint.node_t) :: Blueprint.node_t
flag_invalid(node, flag)

Specs

flag_invalid(Blueprint.node_t, atom) :: Blueprint.node_t
inherit_invalid(node, children, add_flag)
put_error(node, error)

Specs

put_error(Blueprint.node_t, Absinthe.Phase.Error.t) :: Blueprint.node_t
put_flag(node, flag)
run(input, options \\ [])