Content Type / ViewModel Introspection
The GCA provides an Introspect operation for programmatic discovery of the content types and view models in your schema, returning structured metadata about types, fields, and capabilities. This goes beyond standard GraphQL introspection by exposing Brightspot's type system—ObjectType and ObjectField metadata like internal names, display names, indexes, and groupings—rather than just the generated GraphQL types.
Introspection is the foundation for dynamic tools: schema explorers, automatic form generators, query builders, documentation generators, or any application that adapts to schema changes without hardcoding type information.
Configuration
Type-system introspection is off by default. Enable it explicitly:
1GCASchemaSettings.newBuilder()2.readonlyEntryClass(Article.class)3.allowTypeSystemIntrospection()4.build();
This setting is independent of standard GraphQL introspection (__schema queries), which is governed by introspectionQueryRule(...) and allowed only in non-production environments by default. allowTypeSystemIntrospection() adds the Brightspot-specific Introspect entry field described here. See Security.
Anatomy of the Introspect operation
The Introspect root field exposes two branches:
| Field | Description |
|---|---|
Record | Introspect content types: ObjectType and ObjectField metadata. |
View | Introspect view models, mirroring the Record branch for view types. |
The Record branch provides:
| Field | Arguments | Description |
|---|---|---|
types | group: String | All introspectable types, optionally filtered by ObjectType group. |
type | with (one-of) | A single type, looked up by id (UUID), name (internal name), or class (Java class name). |
globals | — | The global fields available on all types. |
Examples
List every type in the schema:
1{2Introspect {3Record {4types {5_id6}7}8}9}
Look up a single type by its Java class and explore its fields:
1query TypeByClass($with: ObjectTypeSchemaGetTypeInput!) {2Introspect {3Record {4type(with: $with) {5_id6}7}8}9}
1{ "with": { "class": "com.example.Article" } }
The returned objects are Brightspot's own ObjectType records, so the metadata you can select—field definitions, display names, internal names, groups—is the same metadata that powers the CMS itself. Restrict results to a subset using types(group: "...") with any ObjectType group name.
Introspection and field filters
Introspection results respect your endpoint configuration: types and fields excluded by your fieldFilter or not reachable from your entry types do not appear. This means a query builder built on Introspect automatically reflects exactly what its users are allowed to query—no separate permission model to maintain.
Discovering queryable fields from SDL
For lighter-weight needs, remember that the generated schema is self-describing even without the Introspect operation: every field carries a @bsp_field / @bsp_method directive with its internal name and an indexed flag marking predicate-eligible fields. See Content Schema Types.
Next steps
- Content Schema Types — how the introspected types map to GraphQL
- GCA Schema Settings Reference — all configuration options