Skip to main content

coerceInputLiteral

Callable

  • coerceInputLiteral(valueNode: ValueNode, type: GraphQLInputType, variableValues?: Maybe<VariableValues>, fragmentVariableValues?: Maybe<VariableValues>, hideSuggestions?: Maybe<boolean>): 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<VariableValues>
    • optionalfragmentVariableValues: Maybe<VariableValues>
    • optionalhideSuggestions: Maybe<boolean>

    Returns unknown