GraphQL API

Configuration of the GraphQL viewer.

Property Default Description

causeway.viewer.graphql.api-scope

Which domain objects to include the GraphQL schema. By default, all domain objects are exposed (entities and view models).

causeway.viewer.graphql.
api-variant

Which variant of API to expose: ApiVariant#QUERY_ONLY (which suppresses any actions that mutate the state of the system), or as ApiVariant#QUERY_AND_MUTATIONS (which additionally exposes actions that mutate the system as mutations) or alternatively as ApiVariant#QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT, a query-only schema that relaxes the read-only rule by exposing actions that mutate the system; it is therefore not compliant with the GraphQL spec),

causeway.viewer.graphql.
authentication.fallback.roles

Used as the set of roles for the default username (if not provided by other means).

causeway.viewer.graphql.
authentication.fallback.username

Used as the default username (if not provided by other means).

causeway.viewer.graphql.lookup.
arg-name

object

This is the name of the synthetic first argument used to locate the object to be looked up.

causeway.viewer.graphql.lookup.
field-name-prefix

Lookup field prefix

causeway.viewer.graphql.lookup.
field-name-suffix

Lookup field suffix

causeway.viewer.graphql.meta-data.
field-name

_meta

Note that field names cannot being with "__", as that is reserved by the underlying GraphQL implementation.

causeway.viewer.graphql.mutation.
target-arg-name

_target

The name of the synthetic argument of mutators representing the target domain object.

causeway.viewer.graphql.resources.
response-type

How resources (Blob bytes, Clob chars, grids and icons) can be downloaded from the resource controller.

By default the download of these resources if ResponseType#FORBIDDEN, but alternatively they can be enabled to download either ResponseType#DIRECTly or as an ResponseType#ATTACHMENT.

causeway.viewer.graphql.
scalar-marshaller.
local-date-format

yyyy-MM-dd

For both JDK8’s LocalDate and JodaTime’s LocalDate

causeway.viewer.graphql.
scalar-marshaller.
local-time-format

HH:mm:ss

For both JDK8’s LocalTime and JodaTime’s LocalTime

causeway.viewer.graphql.
scalar-marshaller.
zoned-date-time-format

yyyy-MM-dd’T’HH:mm:ssXXX

for JDK8’s ZonedDateTime and JodaTime’s DateTime

causeway.viewer.graphql.
schema-style

Which SchemaStyle to expose, "simple" or "rich". By default both are exposed under top-level field names. @see Schema.Rich#getTopLevelFieldName() @see Schema.Simple#getTopLevelFieldName()

causeway.viewer.graphql.schema.
rich.enable-scenario-testing

If the #getSchemaStyle() is set to either SchemaStyle#RICH_ONLY or SchemaStyle#SIMPLE_AND_RICH, then determines whether the "Scenario" field is included in order to allow given/when/then tests to be expressed.

Ignored if the #getSchemaStyle() is SchemaStyle#SIMPLE_ONLY.

causeway.viewer.graphql.schema.
rich.top-level-field-name

rich

If the #getSchemaStyle() is set to SchemaStyle#SIMPLE_AND_RICH, defines the name of the top-level field under which the "rich" schema resides.

Ignored for any other #getSchemaStyle().

causeway.viewer.graphql.schema.
simple.top-level-field-name

simple

If the #getSchemaStyle() is set to SchemaStyle#SIMPLE_AND_RICH, defines the name of the top-level field under which the "simple" schema resides.

Ignored for any other #getSchemaStyle().