GCA Schema Settings Reference
GCASchemaSettings is the single configuration object that drives GCA schema generation. Build it with GCASchemaSettings.newBuilder(), chain the settings you need, and return it from your endpoint's getSchemaSettings() method:
3import com.psddev.dari.db.Recordable;
4import com.psddev.dari.db.Singleton;
5import com.psddev.graphql.gca.GCAEndpoint;
6import com.psddev.graphql.gca.GCASchemaSettings;
8@Recordable.DisplayName("My First GCA Endpoint")
9public class MyFirstGCAEndpoint extends GCAEndpoint implements Singleton {
12 public Set<String> getPaths() {
13 return Set.of("/my-first-gca");
17 protected GCASchemaSettings getSchemaSettings() {
18 return GCASchemaSettings.newBuilder()
This page catalogs every builder setting, grouped by purpose. Unless noted otherwise, boolean settings default to off and are enabled by calling the method with no arguments.
Entry types
The foundation of the schema: which content types are exposed, and with what access level.
| Setting | Description |
|---|
readonlyEntryClass(Class) / readonlyEntryTypes(...) | Expose a type (and its concrete subtypes) for Get and Query. Class, ObjectType, varargs, and collection variants exist. |
mutableEntryClass(Class) / mutableEntryTypes(...) | Expose a type with full read-write access, enabling content mutations. Mutable types are automatically readable. |
entryViewClass(Class) / entryViewClasses(...) | Register content-backed view models. |
endpointViewType(OperationType, Class) / endpointViewTypes(...) | Register standalone (endpoint-backed) view models under the query or mutation root. |
Entry field shape
How the root Get and Query fields are generated.
| Setting | Description |
|---|
includeTypeSpecificEntryFields() | Adds strongly-typed per-type fields (Get/Type/Article, Query/From/Article) alongside the generic Record/Records fields. Grows the schema proportionally to your type count. |
includeAbstractSubtypesInQueryEntryFields() | Also adds entry fields for shared abstract supertypes so consumers can query sibling types together. Requires type-specific entry fields. |
onlyIncludeExplicitEntryFields() | Only explicitly-configured types become entry fields—supertypes don't fan out into their subtypes. Requires type-specific entry fields. |
allowQueriesOnSingletonEntryFields() | Lets Singleton types appear in query entry fields. By default they're only fetchable via Get/Singleton. |
includeImplicitViewEntryFields() | Auto-includes compatible view types that weren't explicitly registered. A workaround setting; prefer explicit registration. |
Query behavior
| Setting | Default | Description |
|---|
defaultQueryLimit(int) | 10 | Limit applied when a query specifies none. |
maximumQueryLimit(int) | 200 | Largest limit a caller may request. |
maximumQueryTimeout(Double) | none | Caps the per-query options.timeout (seconds). |
allowGroupByQueries() | off | Enables groupBy. Changes entry-field return types to unions—a breaking schema change. |
onlyAllowUniqueIndexLookups() | off | Removes arbitrary querying; only single-object fetches by ID, unique index, or permalink remain. |
disallowQueryFieldExecution() | off | Query-typed fields on records expose their metadata (predicate, sorts) but can't be executed/traversed. |
filterVisibilityUnawareQueriesInMemory() | off | Filters invisible records in memory for queries that can't express visibility as a predicate. Only pageInfo.hasNext stays reliable; reserve for small datasets. |
Mutations
| Setting | Description |
|---|
contentActionType(Class) / contentActionTypes(...) | Expose specific write actions (SaveActionDefinition, PublishActionDefinition, ArchiveActionDefinition, RestoreActionDefinition, DeleteActionDefinition, WorkflowActionDefinition, or custom WriteOperationDefinition implementations). |
contentActionTypesAll() | Auto-discover and expose every available write action. |
Editorial features on Get
| Setting | Description |
|---|
includeGetRevision() | Adds the Revision field—revision history (History, drafts, workflow logs). |
includeGetPreview() | Adds the Preview field—shared previews, including previewing through views. |
includeGetOverlay() | Adds the Overlay field—overlay/variation data (requires plugin). |
includeGetDerivation() | Adds the Derivation field—derived content such as translations (requires plugin). |
State and view access
| Setting | Description |
|---|
allowRawStateAccess() | Adds _raw (raw state JSON) to every record type. Bypasses all field filters. |
allowRawViewAccess() | Adds _raw (view as JSON map) to every view type. Resolves the entire view; beware cycles. |
excludeTypeNamesFromRawView() | Strips type/class names from _raw view output. |
includeModelOnViews() | Adds _model to view types for access to the backing record. |
disallowAllStateAccess() | CDA mode. Removes all record state access—State, queries, and mutations—leaving only views (and explicitly registered static methods). Implies onlyAllowUniqueIndexLookups() and negates the editorial Get features above. |
inlineModificationFieldsWhenOnlyOneTypeExists() | Flattens single-modification Mod types onto their parent. Adding a second modification later breaks the inlined queries. |
disallowNullCollectionItems() | Filters nulls out of collections and marks items non-null in the schema. |
Methods
| Setting | Description |
|---|
staticMethod(OperationType, Method) / staticMethod(OperationType, String, Method) | Expose a static method as an Execute field, optionally aliased. |
staticMethods(OperationType, Class) / staticMethods(OperationType, Collection) | Expose all (or a set of) public static methods. |
instanceMethod(Method) / instanceMethods(...) | Attach public instance methods as fields on their declaring record types. |
Runtime context suppliers
Functions evaluated per request (or at schema load, for themes) that connect the endpoint to Brightspot's editorial model.
| Setting | Description |
|---|
siteSupplier(...) | Supplies the current Site. Queries filter to site-accessible content; mutations assign new content's owner and reject inaccessible targets. Also switches URL lookups to site-relative _path. |
toolUserSupplier(...) | Supplies the ToolUser for save attribution (publish/update user)—which also enables History revision creation. |
impersonatedToolUserSupplier(...) | Supplies an impersonated user for saves. Explicitly setting null (when a tool user supplier exists) instead adds a toolUser argument to mutations. |
themeSupplier(...) | Supplies the Theme, adding strongly-typed theme/style fields. Theme changes invalidate the schema. |
Filters and naming
| Setting | Default | Description |
|---|
fieldFilter(...) | allow all | Predicate deciding which ObjectFields appear in the schema. Receives divergent fields with their instantiable parent type. |
referenceTypeFilter(...) | deny all | Predicate deciding which types may be resolved through reference fields. Entry types are always resolvable; denied references return RecordRef. |
richTextElementTypeFilter(...) | allow all | Predicate deciding which rich text element types are included. |
objectTypeTypeNameFunction(...) | built-in | Custom GraphQL names (with fallbacks) for content types. |
viewInterfaceTypeNameFunction(...) | built-in | Custom GraphQL names for view types. |
excludeOuterClassInTypeNamePredicate(...) | none | Whether inner classes' outer class names are dropped from generated names. |
Introspection, complexity, and security
| Setting | Default | Description |
|---|
allowTypeSystemIntrospection() | off | Adds the Introspect operation. |
embeddedFieldComplexity(Integer) | inherit | Complexity points charged for embedded record fields. |
referenceFieldComplexity(Integer) | inherit | Complexity points charged for reference fields (these cost database fetches). |
verboseClientErrors() | off | Detailed execution errors for clients. May expose sensitive data—development only. |
strictMode() | off | Validate settings at build() and throw on invalid input instead of silently omitting it. |
Documentation
| Setting | Description |
|---|
docsSearchProvider(...) | Links schema elements to an external documentation search. |
javadocsProvider(...) | Links schema elements to hosted Javadocs. |
Inherited settings
GCASchemaSettings extends the core GraphQLSchemaSettings, shared by all endpoint kinds (GCA, code generator, framework). The inherited surface—introspection rules, query timeout, maximum depth, complexity managers, SDL output options, locale, schema-load profiling—is documented in the common Schema Settings reference.
Endpoint-level configuration
A few concerns live on GCAEndpoint rather than the settings object:
| Method | Description |
|---|
getPaths() | The URL paths serving this endpoint. |
getSchemaSettings() | Returns the settings built above. |
getApiAccessOption() | Access control; defaults to requiring an API key. See Security. |
updateCorsConfiguration(...) | Adjust CORS origins/headers. |
The endpoint's schema automatically reloads when the database environment refreshes or when Recordable / ViewModel classes are redefined.