Schema Settings
GraphQLSchemaSettings is the base configuration object shared by every endpoint kind. The GCA's GCASchemaSettings extends it, and custom framework endpoints use it directly. Like its subclass, it's built with a fluent builder:
1GraphQLSchemaSettings.newBuilder()2.timeout(Duration.ofSeconds(10))3.maximumQueryDepth(12)4.build();
Introspection
| Setting | Default | Description |
|---|---|---|
introspectionQueryRule(...) | non-production only | Whether GraphQL introspection (__schema queries) is allowed. The default rule permits introspection everywhere except production. Supply your own IntrospectionQueryRule to customize. |
Execution limits
| Setting | Default | Description |
|---|---|---|
timeout(Duration) | none | Maximum query execution time. Exceeding it aborts the operation with a timeout error carrying diagnostic extensions. |
maximumQueryDepth(Integer) | none | Maximum selection-set nesting depth. Introspection queries are exempt. Null or non-positive means unlimited. |
Query complexity
| Setting | Default | Description |
|---|---|---|
defaultFieldComplexity(Integer) | 1 | Base cost of a field. Fields whose cost differs carry a @complexity(value: ...) directive in the SDL. |
addStaticQueryComplexityManager(...) | none | Budget enforced before execution based on the query's declared shape. |
addDynamicQueryComplexityManager(...) | none | Budget enforced during execution based on actual data volume (lists multiply cost). |
staticQueryComplexityManagers(List) / dynamicQueryComplexityManagers(List) | — | Replace the full manager lists. |
See Security for how complexity works end to end.
SDL output
These control the generated SDL text (as served to tooling and recorded in schema versions):
| Setting | Description |
|---|---|
excludeDirectiveDefinitionsFromSDL() | Omit directive definitions. |
excludeDirectivesFromSDL() | Omit directive applications on types and fields. |
excludeCommentsFromSDL() | Omit descriptions/comments. |
includeDebugDirectives() | Include debugging directives in the schema. |
locale(Locale) | Locale for generated documentation strings. Defaults to the system locale. |
Diagnostics
| Setting | Description |
|---|---|
profileSchemaLoad() | Records detailed timing of schema construction, retrievable from the schema loader. Slows loading—use when debugging slow schema builds, not in steady-state production. |
Where settings are applied
An endpoint supplies its settings to its schema loader; the loader bakes them into the generated schema and execution pipeline (instrumentations for timeout, depth, and complexity are installed automatically based on what you configure). Endpoints rebuild their schema when the database environment refreshes or relevant classes are redefined, so settings changes in code take effect on redeploy, and editorial settings changes take effect on publish.
Next steps
- GCA Schema Settings Reference — the GCA-specific superset
- Security — the security-relevant settings in context