GraphQLEnumType
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
config: Readonly<GraphQLEnumTypeConfig>
Returns GraphQLEnumType
Properties
astNode
description
extensionASTNodes
extensions
name
Accessors
[toStringTag]
Returns string
Methods
getValue
Parameters
name: string
Returns Maybe<GraphQLEnumValue>
getValues
Returns readonly GraphQLEnumValue[]
parseLiteral
Parameters
valueNode: ValueNode
_variables: Maybe<ObjMap<unknown>>
Returns any
parseValue
Parameters
inputValue: unknown
Returns any
serialize
Parameters
outputValue: unknown
Returns Maybe<string>
toConfig
Returns GraphQLEnumTypeNormalizedConfig
toJSON
Returns string
toString
Returns string
Enum Type Definition
Some leaf values of requests and input values are Enums. GraphQL serializes Enum values as strings, however internally Enums can be represented by any kind of type, often integers.
Example:
Note: If a value is not provided in a definition, the name of the enum value will be used as its internal value.