Skip to main content
Version: 1.2.x

Built-in Types

The plugin ships a comprehensive set of scalars and object types used across all endpoints. The GCA maps your Java fields onto them automatically; code generator and framework users can reference them directly. This page is the catalog.

Number scalars​

GraphQL natively provides only Int (32-bit) and Float (double precision). The plugin adds the rest of the Java numeric tower:

ScalarJava typeNotes
Bytebyte / Byte8-bit integer.
Shortshort / Short16-bit integer.
Int (built-in)int / Integer32-bit integer.
Longlong / Long64-bit integer—too large for GraphQL Int.
Float (built-in)double / DoubleGraphQL Float is double precision.
BigInteger / BigDecimalBigInteger / BigDecimalArbitrary precision, serialized as numbers.

When the Java primitive form is used in a model, the output field is non-null (Int!); boxed types are nullable.

Date and time scalars​

ScalarJava typeSerialization
Datejava.util.DateEpoch milliseconds (number).
Instantjava.time.InstantISO-8601 string.
LocalDate / LocalTime / LocalDateTimejava.time.*ISO-8601 strings.
ZonedDateTime / OffsetDateTime / OffsetTimejava.time.*ISO-8601 strings with zone/offset.
Duration / Periodjava.time.*ISO-8601 duration strings (PT5M, P3D).
Year / YearMonth / MonthDayjava.time.*ISO-8601 partials.
ZoneId / ZoneOffsetjava.time.*Zone IDs (America/New_York) / offsets (+05:00).

Inputs accept the same format the scalar serializes to; the date-time scalars also accept the standard ISO-8601 string forms.

Identifier and text scalars​

ScalarJava typeNotes
UUIDjava.util.UUIDCanonical UUID string. Used for _id lookups everywhere.
Uri / Urljava.net.URI / URLStrings validated as URIs/URLs on input.
Localejava.util.LocaleIETF language tags (en-US).
JsonanyArbitrary JSON values—objects, arrays, primitives—passed through unmodified. Used for metadata, raw access, and overlays.

StorageItem (files and images)​

StorageItem represents stored files. Binary data is never inlined in responses—clients download via the URLs:

FieldDescription
publicUrl / securePublicUrlThe file's CDN/storage URLs.
contentTypeMIME type.
storage / pathThe storage backend name and item path.
metadata(key)Metadata values—image dimensions, EXIF/IPTC data, custom entries. Returned as JSON; pass a key to select specific values.
httpHeaders(...)The HTTP headers stored with the item.
inStorage / privateStorage status flags.

For writing StorageItems through mutations (multipart upload, URL ingestion, metadata merging), see Content mutations.

Marked text (rich text)​

Rich text fields are exposed as marked text: the plain text plus a list of marks describing formatting and embedded elements by position:

FieldDescription
textThe raw text content.
marksA list of {start, end, descendants, data} entries. data is a union of RteHtmlElement (tag name and attributes) and your rich-text element types.

This representation lets each front end render rich text natively (React elements, native widgets) instead of parsing HTML. Which rich-text element types appear in the union is controlled by the GCA's richTextElementTypeFilter(...).

Geo types​

TypeDescription
GeoPoint / GeoPointInput{latitude: Float!, longitude: Float!}.
GeoArea / GeoAreaInputA geospatial area with three representations: structured geometry (multi-polygon), geoJson, and wkt (Well-Known Text). Inputs are one-of across the same three forms.
GeoPolygon / GeoCircle / GeoLinearRingThe structured geometry building blocks; circles expose center and radius(unit), polygons expose linearRings and area(unit).

Geo types power both location data on content and distance sorting / region predicates in queries.

Map types​

Java Map<String, T> fields generate MapOf<T> object types with three access patterns:

FieldDescription
entriesAll {key, value} pairs.
get(key)A single value by key. Combine with aliases to fetch several keys as named fields.
jsonThe whole map as JSON.

Set<T> serializes as a GraphQL list, identical to List<T>.

Next steps​