Skip to main content

coerceInputLiteral

Callable

  • coerceInputLiteral(valueNode: ValueNode, type: GraphQLInputType, variableValues?: Maybe<ObjMap<unknown>>, fragmentVariableValues?: Maybe<FragmentVariables>): unknown

  • Produces a coerced "internal" JavaScript value given a GraphQL Value AST.

    Returns undefined when the value could not be validly coerced according to the provided type.


    Parameters

    • valueNode: ValueNode
    • type: GraphQLInputType
    • optionalvariableValues: Maybe<ObjMap<unknown>>
    • optionalfragmentVariableValues: Maybe<FragmentVariables>

    Returns unknown