Skip to main content

Scalar Types

For: Developers

Boolean

This is an "Scalar" type

Represents true or false values.

String

This is an "Scalar" type

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.

ID

This is an "Scalar" type

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as VXNlci0xMA==) or integer (such as 4) input value will be accepted as an ID.

Int

This is an "Scalar" type

Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Float

This is an "Scalar" type

Represents signed double-precision fractional values as specified by IEEE 754.

ISO8601DateTime

This is an "Scalar" type

An ISO 8601-encoded datetime

Phone

This is an "Scalar" type

A valid US phone number. Phone numbers with dashes or a leading +1 will be normalized and stored as a 10 digit number: 5555555555.

Uri

This is an "Scalar" type

A valid URL, transported as a string

Did this answer your question?