Skip to main content

valueFromASTUntyped

Callable

  • valueFromASTUntyped(valueNode: ValueNode, variables?: Maybe<ObjMap<unknown>>): unknown

  • Produces a JavaScript value given a GraphQL Value AST.

    No type is provided. The resulting JavaScript value will reflect the provided GraphQL value AST.

    GraphQL ValueJavaScript Value
    Input ObjectObject
    ListArray
    BooleanBoolean
    String / EnumString
    Int / FloatNumber
    Nullnull

    Parameters

    • valueNode: ValueNode
    • optionalvariables: Maybe<ObjMap<unknown>>

    Returns unknown