GraphQLScalarType <TInternal, TExternal>
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Type parameters
- TInternal = unknown
- TExternal = TInternal
Parameters
config: Readonly<GraphQLScalarTypeConfig<TInternal, TExternal>>
Returns GraphQLScalarType<TInternal, TExternal>
Properties
astNode
description
extensionASTNodes
extensions
name
parseLiteral
parseValue
serialize
specifiedByURL
Accessors
[toStringTag]
Returns string
Methods
toConfig
Returns GraphQLScalarTypeNormalizedConfig<TInternal, TExternal>
toJSON
Returns string
toString
Returns string
Scalar Type Definition
The leaf values of any request and input values to arguments are Scalars (or Enums) and are defined with a name and a series of functions used to parse input from ast or variables and to ensure validity.
If a type’s serialize function returns
null
or does not return a value (i.e. it returnsundefined
) then an error will be raised and anull
value will be returned in the response. It is always better to validateExample: