absinthe v1.2.0-beta.0 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 will also coerce non list inputs into list inputs IE
foo(ids: 1)
becomes
foo(ids: [1])
if ids
is a list type.
Summary
Functions
Callback implementation for Absinthe.Phase.run/2
.