Common GraphQL Scalars

Last updated on June 18, 2024.

GraphQL scalar types are similar to primitive types in other programming languages. They always resolve to concrete data. Use this document to guide you in using GraphQL scalar types on Insites.

ID

The scalar type represents a unique identifier, often used to refetch an object or as a 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 ) or integer (such as ) input value will be accepted as an ID.

String

The scalar type represents textual data as UTF-8 character sequences. GraphQL most often uses the String type to represent free-form human-readable text.

Int

The scalar type represents non-fractional signed whole numeric values. It can represent values between .

Boolean

The scalar type represents or .

ActivityStreamsPayload

Represents objects.

Float

The scalar type represents signed double-precision fractional values as specified by IEEE 754.

Any

It could be any of the following:

CssColor

Colour can be represented by:

GeometryJSON

GeometryJSON is a JSON format for encoding a variety of geographic data structures. It supports the following geometry types:

Point example:

Polygon example:

More information:https://tools.ietf.org/html/rfc7946.

HashObject

Represents data as a collection of unique keys and their values. They are also known as associative arrays, maps or dictionaries. It can be any level deep. You can create it in liquid by converting JSON object with filter or tag.

HeadersObject

Represents data defined by Insites stored in the variable.

ISO8601DateTime

An ISO 8601-encoded DateTime.

ImageBlur

Code example:

ImageQuality

Defines the quality of the image, 0 - lowest quality, 100 - highest quality.

JSONDate

Represents Date and time data expressed according to ISO 8601 format to which values are automatically converted.

JSONPayload

Represents data structures formatted as JSON standard.

LatDegree

Must be within range -90.0..90.0.

LngDegree

Must be within range -180.0..180.0.

ParamsObject

Represents data defined by Insites stored in a variable.

PropertyName

Model property name.

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.