Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/utilssrcfunctionsastFromValueUntyped

Function: astFromValueUntyped()

astFromValueUntyped(value): ValueNode | null

Defined in: packages/utils/src/astFromValueUntyped.ts:19

Produces a GraphQL Value AST given a JavaScript object. Function will match JavaScript/JSON values to GraphQL AST schema format by using the following mapping.

JSON ValueGraphQL Value
ObjectInput Object
ArrayList
BooleanBoolean
StringString
NumberInt / Float
BigIntInt
nullNullValue

Parameters

value

any

Returns

ValueNode | null