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

Coerce variable string inputs to enums when appropriate.

A literal enum like foo(arg: ENUM) is parsed as an Input.Enum struct.

However when a variable is used foo(arg: $enumVar) the variable input ends up being an Input.String because the variable handler does not yet know the schema type. This phase coerces string to enum inputs when the schema type is an Enum.

This may be merged into another phase in the future.

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 \\ [])