CausewayConfiguration.Viewer.Graphql.ApiScope (enum)

Specifies which elements of the metamodel are included within the generated GraphQL spec.

API

CausewayConfiguration_Viewer_Graphql_ApiScope.java
enum ApiScope {
  VIEW_MODELS     (1)
  ALL     (2)
}
1 VIEW_MODELS

The generated GraphQL spec is restricted only to include only org.apache.causeway.applib.annotation.Nature#VIEW_MODEL view model s.

2 ALL

The generated GraphQL spec is not restricted, includes both org.apache.causeway.applib.annotation.Nature#ENTITY domain entities as well as org.apache.causeway.applib.annotation.Nature#VIEW_MODEL view model s.

Members

VIEW_MODELS

The generated GraphQL spec is restricted only to include only org.apache.causeway.applib.annotation.Nature#VIEW_MODEL view model s.

Applicable when the GraphQL API is in use by third-party clients, ie public use and not under the control of the authors of the backend Apache Causeway application. Exposing entities also would couple the GraphQL client too deeply to the backend implementation.

ALL

The generated GraphQL spec is not restricted, includes both org.apache.causeway.applib.annotation.Nature#ENTITY domain entities as well as org.apache.causeway.applib.annotation.Nature#VIEW_MODEL view model s.

This is perfectly acceptable where the team developing the GraphQL client is the same as the team developing the backend service …​ the use of the Web API between the client and server is a private implementation detail of the application.