CausewayConfiguration.Viewer.Graphql.SchemaStyle (enum)
Which style of schema to expose: "simple", "rich" or some combination of both.
API
enum SchemaStyle {
SIMPLE_ONLY (1)
RICH_ONLY (2)
SIMPLE_AND_RICH (3)
RICH_AND_SIMPLE (4)
boolean isRich()
boolean isSimple()
}
1 | SIMPLE_ONLY
Expose only the "simple" schema, defining only fields that return the state of the domain objects but with no fields to represent additional facets of state (such as whether an action is hidden or disabled). |
2 | RICH_ONLY
Expose only the "rich" schema, exposing not only fields that return the state of the domain objects but also with fields to represent additional facets of state (such as whether an action is hidden or disabled). |
3 | SIMPLE_AND_RICH
Exposes both the simple and rich schemas, for the query have each under a field as defined by Schema.Simple#getTopLevelFieldName() (by default "simple") and Schema.Rich#getTopLevelFieldName() (by default "rich"). |
4 | RICH_AND_SIMPLE
Exposes both the simple and rich schemas, for the query have each under a field as defined by Schema.Simple#getTopLevelFieldName() (by default "simple") and Schema.Rich#getTopLevelFieldName() (by default "rich"). |
Members
SIMPLE_ONLY
Expose only the "simple" schema, defining only fields that return the state of the domain objects but with no fields to represent additional facets of state (such as whether an action is hidden or disabled).
Suitable for clients where the application logic and state is the responsibility of the client.
RICH_ONLY
Expose only the "rich" schema, exposing not only fields that return the state of the domain objects but also with fields to represent additional facets of state (such as whether an action is hidden or disabled).
Optionally, fields for Scenario (given/when/then) testing may also be added if the Schema.Rich#isEnableScenarioTesting() config property is set.
Suitable for clients where the application logic and state remains in the backend, within the domain model hosted by Causeway.