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:
| Scalar | Java type | Notes |
|---|---|---|
Byte | byte / Byte | 8-bit integer. |
Short | short / Short | 16-bit integer. |
Int (built-in) | int / Integer | 32-bit integer. |
Long | long / Long | 64-bit integer—too large for GraphQL Int. |
Float (built-in) | double / Double | GraphQL Float is double precision. |
BigInteger / BigDecimal | BigInteger / BigDecimal | Arbitrary 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
| Scalar | Java type | Serialization |
|---|---|---|
Date | java.util.Date | Epoch milliseconds (number). |
Instant | java.time.Instant | ISO-8601 string. |
LocalDate / LocalTime / LocalDateTime | java.time.* | ISO-8601 strings. |
ZonedDateTime / OffsetDateTime / OffsetTime | java.time.* | ISO-8601 strings with zone/offset. |
Duration / Period | java.time.* | ISO-8601 duration strings (PT5M, P3D). |
Year / YearMonth / MonthDay | java.time.* | ISO-8601 partials. |
ZoneId / ZoneOffset | java.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
| Scalar | Java type | Notes |
|---|---|---|
UUID | java.util.UUID | Canonical UUID string. Used for _id lookups everywhere. |
Uri / Url | java.net.URI / URL | Strings validated as URIs/URLs on input. |
Locale | java.util.Locale | IETF language tags (en-US). |
Json | any | Arbitrary 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:
| Field | Description |
|---|---|
publicUrl / securePublicUrl | The file's CDN/storage URLs. |
contentType | MIME type. |
storage / path | The 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 / private | Storage 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:
| Field | Description |
|---|---|
text | The raw text content. |
marks | A 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
| Type | Description |
|---|---|
GeoPoint / GeoPointInput | {latitude: Float!, longitude: Float!}. |
GeoArea / GeoAreaInput | A 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 / GeoLinearRing | The 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:
| Field | Description |
|---|---|
entries | All {key, value} pairs. |
get(key) | A single value by key. Combine with aliases to fetch several keys as named fields. |
json | The whole map as JSON. |
Set<T> serializes as a GraphQL list, identical to List<T>.
Next steps
- Content Schema Types — how the GCA chooses these types for your fields
- Framework Type Generators — using built-in types in custom schemas