Skip to content

Scalars

About scalars

Scalars include primitive values, such as Boolean, Float, ID, Int or String.

When calling the GraphQL API, you must specify nested subfields until you return only scalars.

The Worlds API also defines several custom scalar types.

Boolean

Represents true or false values.

DateTimeOffset

Represents a moment in time described by the date, the time and the timezone offset from UTC. This is specified by ISO-8601.

Float

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

ID

Represents a unique identifier. The ID type appears in a JSON response as a String and is not intended to be human-readable. IDs are passed and returned as plain strings or integers. 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

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

JSON

Represents arbitrary data in JSON format. Commonly used for metadata added by custom processes. See JSON and the ECMA-404 standard.

String

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