You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/02/16 18:08:40 UTC

(causeway) branch CAUSEWAY-3676 updated (f3cd97b0da -> 61dbe87fef)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git


 discard f3cd97b0da CAUSEWAY-3676: reorg imports is all
 discard bd77ee5bb7 CAUSEWAY-3676: use addChildFieldFor where possible; removes 'grid' from test; adds clob controller
 discard 4f83e1478e CAUSEWAY-3676: scrubs bookmarks for repeatability; removes the ugly 'gqlv_' part of the default prefixes
 discard 5aa9317523 CAUSEWAY-3676: adds test to download from URL
 discard d5a6515397 CAUSEWAY-3676: adds support for retrieving blob bytes via rest controller;
     add b28284eea1 CAUSEWAY-3404: adds annotation DisabledIfRunningWithSurefire
     add c638d193cb CAUSEWAY-3404: removes unused import in prev. commit
     new 4e63787388 CAUSEWAY-3676: adds support for retrieving blob bytes via rest controller;
     new f69ed4d8a9 CAUSEWAY-3676: adds test to download from URL
     new 9a2276ea4a CAUSEWAY-3676: scrubs bookmarks for repeatability; removes the ugly 'gqlv_' part of the default prefixes
     new 8b42a17e24 CAUSEWAY-3676: use addChildFieldFor where possible; removes 'grid' from test; adds clob controller
     new 70e30a4e95 CAUSEWAY-3676: reorg imports is all
     new 411b81cb00 CAUSEWAY-3676: fixes integ test, adds clob as url, speeds up interpolation
     new 74bcab882d CAUSEWAY-3676: further removal of unnecessary work
     new 61dbe87fef CAUSEWAY-3676: experiment if can add multiple fields of different types; seemingly not.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f3cd97b0da)
            \
             N -- N -- N   refs/heads/CAUSEWAY-3676 (61dbe87fef)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../annotations/DisabledIfRunningWithSurefire.java |  45 ++--
 .../secondary/fetch/CommandFetcher_Test.java       |   4 +-
 .../domainmodel/MetaModelRegressionTest.java       |   2 -
 .../injecting/jpa/JpaEntityInjectingTest.java      |   4 +-
 ...actionRollbackTest_usingInteractionService.java |   7 +-
 ...actionRollbackTest_usingTransactionService.java |  10 +-
 .../jpa/JpaTransactionScopeListenerTest.java       |   4 +-
 .../testdomain/rest/JsonValueEncoderTest.java      |   1 -
 .../testdomain/rest/RestServiceStressTest.java     |   4 +-
 scripts/ci/rename-all-published-sources.jsh        |  28 +-
 .../annotations/DisabledIfRunningWithSurefire.java |  43 +--
 .../tooling/javamodel/test/AnalyzerTest.java       |   6 +-
 .../graphql/model/domain/GqlvAbstractCustom.java   |   7 +-
 .../viewer/graphql/model/domain/GqlvAction.java    |  13 +-
 .../graphql/model/domain/GqlvActionParam.java      |  18 ++
 .../graphql/model/domain/GqlvActionParams.java     |   5 +
 .../graphql/model/domain/GqlvCollection.java       |  10 +
 .../graphql/model/domain/GqlvDomainObject.java     |  11 +
 .../graphql/model/domain/GqlvDomainService.java    |   4 +
 .../viewer/graphql/model/domain/GqlvMeta.java      |  16 ++
 .../viewer/graphql/model/domain/GqlvProperty.java  |  22 +-
 .../graphql/model/domain/GqlvPropertyGetBlob.java  |  12 +
 .../graphql/model/domain/GqlvPropertyGetClob.java  |  10 +
 .../graphql/model/domain/GqlvScenarioStep.java     |   4 +
 .../model/toplevel/GqlvTopLevelMutation.java       |   4 +
 .../schema/GqlSchemaQuery_print_IntegTest.java     |  31 ---
 ...tegTest.java => GqlSchema_print_IntegTest.java} |   4 +-
 viewers/graphql/test/src/test/resources/schema.gql | 292 ++++++++++-----------
 .../wicket/viewer/wicketapp/CryptFactoryTest.java  |   5 +-
 29 files changed, 359 insertions(+), 267 deletions(-)
 copy api/applib/src/main/java/org/apache/causeway/applib/annotation/ParameterTuple.java => core/internaltestsupport/src/main/java/org/apache/causeway/core/internaltestsupport/annotations/DisabledIfRunningWithSurefire.java (53%)
 copy api/applib/src/main/java/org/apache/causeway/applib/annotation/ParameterTuple.java => testing/unittestsupport/applib/src/main/java/org/apache/causeway/testing/unittestsupport/applib/annotations/DisabledIfRunningWithSurefire.java (57%)
 delete mode 100644 viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
 rename viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/{AbstractGqlSchema_print_IntegTest.java => GqlSchema_print_IntegTest.java} (94%)


(causeway) 04/08: CAUSEWAY-3676: use addChildFieldFor where possible; removes 'grid' from test; adds clob controller

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 8b42a17e241dc82c86a4c79ad437cc6bca74c528
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 15 07:12:03 2024 +0000

    CAUSEWAY-3676: use addChildFieldFor where possible; removes 'grid' from test; adds clob controller
---
 .../graphql/model/domain/GqlvAbstractCustom.java   | 14 ++--
 .../viewer/graphql/model/domain/GqlvAction.java    | 33 ++++----
 .../graphql/model/domain/GqlvActionParam.java      | 41 ++--------
 .../graphql/model/domain/GqlvActionParams.java     |  4 +-
 .../graphql/model/domain/GqlvCollection.java       | 15 +---
 .../graphql/model/domain/GqlvDomainObject.java     | 25 +++---
 .../graphql/model/domain/GqlvDomainService.java    |  2 +-
 .../viewer/graphql/model/domain/GqlvMeta.java      | 45 ++++-------
 .../viewer/graphql/model/domain/GqlvProperty.java  | 71 ++++++++---------
 .../graphql/model/domain/GqlvPropertyGetClob.java  | 90 ++++++++++++++++++++++
 .../model/domain/GqlvPropertyGetClobAbstract.java  | 78 +++++++++++++++++++
 .../model/domain/GqlvPropertyGetClobChars.java     | 49 ++++++++++++
 .../model/domain/GqlvPropertyGetClobMimeType.java  | 39 ++++++++++
 .../model/domain/GqlvPropertyGetClobName.java      | 39 ++++++++++
 .../viewer/graphql/model/domain/GqlvScenario.java  |  3 +-
 .../graphql/model/domain/GqlvScenarioStep.java     | 10 ++-
 .../model/toplevel/GqlvTopLevelMutation.java       |  4 +-
 .../graphql/model/toplevel/GqlvTopLevelQuery.java  | 13 ++--
 ...gTest.create_staff_member_with_department._.gql |  1 -
 ...eate_staff_member_with_department.approved.json |  3 +-
 .../viewer/CausewayModuleViewerGraphqlViewer.java  |  4 +-
 ...ytesController.java => ResourceController.java} | 41 +++++++---
 22 files changed, 447 insertions(+), 177 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
index 479b7cc62e..5d4e78a012 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
@@ -27,6 +27,8 @@ import static graphql.schema.GraphQLObjectType.newObject;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
+import org.springframework.lang.Nullable;
+
 import lombok.AccessLevel;
 import lombok.Getter;
 
@@ -59,15 +61,17 @@ public abstract class GqlvAbstractCustom extends GqlvAbstract implements Parent
         return gqlObjectType != null;
     }
 
-    protected final void addChildFieldFor(GqlvAbstract hasField) {
-        addChildField(hasField.getField());
-    }
-
-    protected final void addChildField(GraphQLFieldDefinition childField) {
+    protected final void addChildFieldFor(@Nullable GqlvAbstract hasField) {
         if (isBuilt()) {
+            throw new IllegalStateException("Object type has already been built");
+        }
+        if (hasField == null) {
             return;
         }
+        addChildField(hasField.getField());
+    }
 
+    void addChildField(GraphQLFieldDefinition childField) {
         if (childField != null) {
             gqlObjectTypeBuilder.field(childField);
         }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
index fa8ef68e2c..7c46953a23 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
@@ -26,6 +26,7 @@ import java.util.stream.Collectors;
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.commons.collections.Can;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
@@ -76,23 +77,29 @@ public class GqlvAction
         addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
         addChildFieldFor(this.validate = new GqlvActionValidity(this, context));
 
-        val variant = context.causewayConfiguration.getViewer().getGraphql().getApiVariant();
-        if (objectAction.getSemantics().isSafeInNature() || variant == QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT) {
-            addChildFieldFor(this.invoke = new GqlvActionInvoke(this, context));
-        } else {
-            this.invoke = null;
-        }
-        val params = new GqlvActionParams(this, context);
-        if (params.hasParams()) {
-            this.params = params;
-            addChildField(params.getField());
-        } else {
-            this.params = null;
-        }
+        addChildFieldFor(
+                this.invoke = isInvokeAllowed(objectAction)
+                    ? new GqlvActionInvoke(this, context)
+                    : null);
+        addChildFieldFor(this.params = new GqlvActionParams(this, context));
 
         buildObjectTypeAndField(objectAction.getId());
     }
 
+    private boolean isInvokeAllowed(ObjectAction objectAction) {
+        val apiVariant = context.causewayConfiguration.getViewer().getGraphql().getApiVariant();
+        switch (apiVariant) {
+            case QUERY_ONLY:
+            case QUERY_AND_MUTATIONS:
+                return objectAction.getSemantics().isSafeInNature();
+            case QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT:
+                return true;
+            default:
+                // shouldn't happen
+                throw new IllegalArgumentException("Unknown API variant: " + apiVariant);
+        }
+    }
+
     public Can<ManagedObject> argumentManagedObjectsFor(
             final DataFetchingEnvironment dataFetchingEnvironment,
             final ObjectAction objectAction,
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
index d9f6d096dc..6cf6e6df7a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
@@ -79,40 +79,13 @@ public class GqlvActionParam
         this.objectActionParameter = objectActionParameter;
         this.paramNum = paramNum;
 
-        this.hidden = new GqlvActionParamHidden(this, context);
-        addChildField(hidden.getField());
-        this.disabled = new GqlvActionParamDisabled(this, context);
-        addChildField(disabled.getField());
-
-        val choices = new GqlvActionParamChoices(this, context);
-        addChildField(choices.getField());
-        if (choices.isFieldDefined()) {
-            this.choices = choices;
-        } else {
-            this.choices = null;
-        }
-
-        val autoComplete = new GqlvActionParamAutoComplete(this, context);
-        addChildField(autoComplete.getField());
-        if (autoComplete.isFieldDefined()) {
-            this.autoComplete = autoComplete;
-        } else {
-            this.autoComplete = null;
-        }
-
-        val default_ = new GqlvActionParamDefault(this, context);
-        addChildField(default_.getField());
-        if (default_.isFieldDefined()) {
-            this.default_ = default_;
-        } else {
-            this.default_ = null;
-        }
-
-        this.validate = new GqlvActionParamValidate(this, context);
-        addChildField(validate.getField());
-
-        this.datatype = new GqlvActionParamDatatype(this, context);
-        addChildField(datatype.getField());
+        addChildFieldFor(this.hidden = new GqlvActionParamHidden(this, context));
+        addChildFieldFor(this.disabled = new GqlvActionParamDisabled(this, context));
+        addChildFieldFor(this.choices = new GqlvActionParamChoices(this, context));
+        addChildFieldFor(this.autoComplete = new GqlvActionParamAutoComplete(this, context));
+        addChildFieldFor(this.default_ = new GqlvActionParamDefault(this, context));
+        addChildFieldFor(this.validate = new GqlvActionParamValidate(this, context));
+        addChildFieldFor(this.datatype = new GqlvActionParamDatatype(this, context));
 
         buildObjectTypeAndField(objectActionParameter.getId());
     }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
index e043d61d1d..0eccf8d435 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
@@ -85,8 +85,8 @@ public class GqlvActionParams
     }
 
     void addParam(ObjectActionParameter objectActionParameter, int paramNum) {
-        GqlvActionParam gqlvActionParam = new GqlvActionParam(this, objectActionParameter, context, paramNum);
-        addChildField(gqlvActionParam.getField());
+        val gqlvActionParam = new GqlvActionParam(this, objectActionParameter, context, paramNum);
+        addChildFieldFor(gqlvActionParam);
         params.put(objectActionParameter.getId(), gqlvActionParam);
     }
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
index 4d3ab7a15c..c5b4ff6343 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
@@ -41,17 +41,10 @@ public class GqlvCollection
     ) {
         super(holder, oneToManyAssociation, TypeNames.collectionTypeNameFor(holder.getObjectSpecification(), oneToManyAssociation), context);
 
-        this.hidden = new GqlvMemberHidden<>(this, context);
-        addChildField(hidden.getField());
-
-        this.disabled = new GqlvMemberDisabled<>(this, context);
-        addChildField(disabled.getField());
-
-        this.get = new GqlvCollectionGet(this, context);
-        addChildField(get.getField());
-
-        this.datatype = new GqlvCollectionDatatype(this, context);
-        addChildField(datatype.getField());
+        addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
+        addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
+        addChildFieldFor(this.get = new GqlvCollectionGet(this, context));
+        addChildFieldFor(this.datatype = new GqlvCollectionDatatype(this, context));
 
         buildObjectTypeAndField(oneToManyAssociation.getId());
     }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
index e4f895fd26..71a88f83e6 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
@@ -74,11 +74,10 @@ public class GqlvDomainObject
         this.objectSpecification = objectSpecification;
         gqlObjectTypeBuilder.description(objectSpecification.getDescription());
 
-        this.meta = new GqlvMeta(this, context);
-        addChildField(meta.getField());
+        addChildFieldFor(this.meta = new GqlvMeta(this, context));
 
-        GraphQLInputObjectType.Builder inputTypeBuilder = newInputObject().name(TypeNames.inputTypeNameFor(objectSpecification));
-        inputTypeBuilder
+        val inputObjectTypeBuilder = newInputObject().name(TypeNames.inputTypeNameFor(objectSpecification));
+        inputObjectTypeBuilder
                 .field(newInputObjectField()
                         .name("id")
                         .type(Scalars.GraphQLID)
@@ -90,7 +89,7 @@ public class GqlvDomainObject
                         .build()
                 )
         ;
-        gqlInputObjectType = inputTypeBuilder.build();
+        gqlInputObjectType = inputObjectTypeBuilder.build();
 
         setField(buildFieldDefinition(gqlInputObjectType));
 
@@ -129,8 +128,8 @@ public class GqlvDomainObject
 
         objectSpecification.streamActions(context.getActionScope(), MixedIn.INCLUDED)
                 .forEach(objectAction -> {
-                    GqlvAction gqlvAction = new GqlvAction(this, objectAction, context);
-                    addChildField(gqlvAction.getField());
+                    val gqlvAction = new GqlvAction(this, objectAction, context);
+                    addChildFieldFor(gqlvAction);
                     actions.put(objectAction.getId(), gqlvAction);
                 });
     }
@@ -143,16 +142,16 @@ public class GqlvDomainObject
     }
 
     private void addProperty(final OneToOneAssociation otoa) {
-        GqlvProperty gqlvProperty = new GqlvProperty(this, otoa, context);
-        addChildField(gqlvProperty.getField());
+        val gqlvProperty = new GqlvProperty(this, otoa, context);
+        addChildFieldFor(gqlvProperty);
         properties.put(otoa.getId(), gqlvProperty);
     }
 
     private void addCollection(OneToManyAssociation otom) {
-        GqlvCollection collection = new GqlvCollection(this, otom, context);
-        addChildField(collection.getField());
-        if (collection.isFieldDefined()) {
-            collections.put(otom.getId(), collection);
+        val gqlvCollection = new GqlvCollection(this, otom, context);
+        addChildFieldFor(gqlvCollection);
+        if (gqlvCollection.isFieldDefined()) {
+            collections.put(otom.getId(), gqlvCollection);
         }
     }
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
index 8ffe5a6c85..7a51948524 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
@@ -82,7 +82,7 @@ public class GqlvDomainService
 
     private void addAction(final ObjectAction objectAction) {
         val gqlvAction = new GqlvAction(this, objectAction, context);
-        addChildField(gqlvAction.getField());
+        addChildFieldFor(gqlvAction);
         actions.put(objectAction.getId(), gqlvAction);
     }
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
index 15181e1c19..bd12ca4380 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
@@ -57,46 +57,29 @@ public class GqlvMeta extends GqlvAbstractCustom {
         super(TypeNames.metaTypeNameFor(holder.getObjectSpecification()), context);
         this.holder = holder;
 
-        metaId = new GqlvMetaId(context);
-        addChildField(metaId.getField());
-
-        metaLogicalTypeName = new GqlvMetaLogicalTypeName(context);
-        addChildField(metaLogicalTypeName.getField());
-
-        if (holder.getObjectSpecification().getBeanSort() == BeanSort.ENTITY) {
-            metaVersion = new GqlvMetaVersion(context);
-            addChildField(metaVersion.getField());
-        } else {
-            metaVersion = null;
-        }
-
-        metaTitle = new GqlvMetaTitle(context);
-        addChildField(metaTitle.getField());
-
-        metaIconName = new GqlvMetaIconName(context);
-        addChildField(metaIconName.getField());
-
-        metaCssClass = new GqlvMetaCssClass(context);
-        addChildField(metaCssClass.getField());
-
-        metaLayout = new GqlvMetaLayout(context);
-        addChildField(metaLayout.getField());
-
-        metaGrid = new GqlvMetaGrid(context);
-        addChildField(metaGrid.getField());
-
-        metaSaveAs = new GqlvMetaSaveAs(context);
-        addChildField(metaSaveAs.getField());
+        addChildFieldFor(this.metaId = new GqlvMetaId(context));
+        addChildFieldFor(this.metaLogicalTypeName = new GqlvMetaLogicalTypeName(context));
+        addChildFieldFor(this.metaVersion = isEntity() ? new GqlvMetaVersion(context) : null);
+        addChildFieldFor(this.metaTitle = new GqlvMetaTitle(context));
+        addChildFieldFor(this.metaIconName = new GqlvMetaIconName(context));
+        addChildFieldFor(this.metaCssClass = new GqlvMetaCssClass(context));
+        addChildFieldFor(this.metaLayout = new GqlvMetaLayout(context));
+        addChildFieldFor(this.metaGrid = new GqlvMetaGrid(context));
+        addChildFieldFor(this.metaSaveAs = new GqlvMetaSaveAs(context));
 
         val fieldName = context.causewayConfiguration.getViewer().getGraphql().getMetaData().getFieldName();
         buildObjectTypeAndField(fieldName);
     }
 
+    private boolean isEntity() {
+        return holder.getObjectSpecification().getBeanSort() == BeanSort.ENTITY;
+    }
+
     @Override
     protected void addDataFetchersForChildren() {
         metaId.addDataFetcher(this);
         metaLogicalTypeName.addDataFetcher(this);
-        if (holder.getObjectSpecification().getBeanSort() == BeanSort.ENTITY) {
+        if (isEntity()) {
             metaVersion.addDataFetcher(this);
         }
         metaTitle.addDataFetcher(this);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
index 7e82bd35fc..f6ffed52d3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
@@ -25,6 +25,7 @@ import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.applib.value.Clob;
 import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
+import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
@@ -41,7 +42,8 @@ public class GqlvProperty
         GqlvPropertyValidate.Holder,
         GqlvPropertySet.Holder,
         GqlvAssociationDatatype.Holder<OneToOneAssociation>,
-        GqlvPropertyGetBlob.Holder {
+        GqlvPropertyGetBlob.Holder,
+        GqlvPropertyGetClob.Holder {
 
     private final GqlvMemberHidden<OneToOneAssociation> hidden;
     private final GqlvMemberDisabled<OneToOneAssociation> disabled;
@@ -68,51 +70,42 @@ public class GqlvProperty
             final Context context) {
         super(holder, oneToOneAssociation, TypeNames.propertyTypeNameFor(holder.getObjectSpecification(), oneToOneAssociation), context);
 
-        this.hidden = new GqlvMemberHidden<>(this, context);
-        addChildField(hidden.getField());
+        addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
+        addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
 
-        this.disabled = new GqlvMemberDisabled<>(this, context);
-        addChildField(disabled.getField());
+        this.get = isBlob() ? new GqlvPropertyGetBlob(this, context) : isClob() ? new GqlvPropertyGetClob(this, context) : new GqlvPropertyGet(this, context);
+        addChildFieldFor(
+                isBlob()
+                    ? new GqlvPropertyGetBlob(this, context)
+                    : isClob()
+                        ? new GqlvPropertyGetClob(this, context)
+                        : new GqlvPropertyGet(this, context)
+        );
 
-        if (isBlob()) {
-            this.get = new GqlvPropertyGetBlob(this, context);
-        } else {
-            this.get = new GqlvPropertyGet(this, context);
-        }
-        addChildField(get.getField());
-
-        this.validate = new GqlvPropertyValidate(this, context);
-        addChildField(this.validate.getField());
+        addChildFieldFor(this.validate = new GqlvPropertyValidate(this, context));
+        addChildFieldFor(this.choices = new GqlvPropertyChoices(this, context));
+        addChildFieldFor(this.autoComplete = new GqlvPropertyAutoComplete(this, context));
+        addChildFieldFor(this.set = isSetterAllowed() ? new GqlvPropertySet(this, context) : null);
+        addChildFieldFor(this.datatype = new GqlvPropertyDatatype(this, context));
 
-        val choices = new GqlvPropertyChoices(this, context);
-        if (choices.isFieldDefined()) {
-            addChildField(choices.getField());
-            this.choices = choices;
-        } else {
-            this.choices = null;
-        }
-
-        val autoComplete = new GqlvPropertyAutoComplete(this, context);
-        if (autoComplete.isFieldDefined()) {
-            addChildField(autoComplete.getField());
-            this.autoComplete = autoComplete;
-        } else {
-            this.autoComplete = null;
-        }
+        buildObjectTypeAndField(oneToOneAssociation.getId());
+    }
 
-        val variant = context.causewayConfiguration.getViewer().getGraphql().getApiVariant();
-        if (variant == CausewayConfiguration.Viewer.Graphql.ApiVariant.QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT) {
-            this.set = new GqlvPropertySet(this, context);
-            addChildField(set.getField());
-        } else {
-            this.set = null;
+    private boolean isSetterAllowed() {
+        val apiVariant = context.causewayConfiguration.getViewer().getGraphql().getApiVariant();
+        switch (apiVariant) {
+            case QUERY_ONLY:
+            case QUERY_AND_MUTATIONS:
+                return false;
+            case QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT:
+                return true;
+            default:
+                // shouldn't happen
+                throw new IllegalArgumentException("Unknown API variant: " + apiVariant);
         }
+    }
 
-        this.datatype = new GqlvPropertyDatatype(this, context);
-        addChildField(datatype.getField());
 
-        buildObjectTypeAndField(oneToOneAssociation.getId());
-    }
 
     private boolean isBlob() {
         return getOneToOneAssociation().getElementType().getCorrespondingClass() == Blob.class;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java
new file mode 100644
index 0000000000..1944815515
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import graphql.schema.DataFetchingEnvironment;
+
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+
+import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectAssociationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+
+public class GqlvPropertyGetClob
+        extends GqlvAbstractCustom
+        implements GqlvPropertyGetClobChars.Holder
+{
+
+    final Holder holder;
+    final GqlvPropertyGetClobChars clobChars;
+    final GqlvPropertyGetClobMimeType clobMimeType;
+    final GqlvPropertyGetClobName clobName;
+
+    public GqlvPropertyGetClob(
+            final Holder holder,
+            final Context context) {
+        super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember()), context);
+        this.holder = holder;
+
+        addChildFieldFor(clobChars = new GqlvPropertyGetClobChars(this, context));
+        addChildFieldFor(clobMimeType = new GqlvPropertyGetClobMimeType(this, context));
+        addChildFieldFor(clobName = new GqlvPropertyGetClobName(this, context));
+
+        setField(newFieldDefinition()
+                    .name("get")
+                    .type(buildObjectType())
+                    .build());
+    }
+
+    @Override
+    protected Object fetchData(final DataFetchingEnvironment dataFetchingEnvironment) {
+        return BookmarkedPojo.sourceFrom(dataFetchingEnvironment, context);
+    }
+
+    @Override
+    protected void addDataFetchersForChildren() {
+        clobChars.addDataFetcher(this);
+        clobMimeType.addDataFetcher(this);
+        clobName.addDataFetcher(this);
+    }
+
+    @Override
+    public OneToOneAssociation getObjectAssociation() {
+        return holder.getObjectAssociation();
+    }
+
+    @Override
+    public OneToOneAssociation getObjectMember() {
+        return holder.getObjectMember();
+    }
+
+    @Override
+    public ObjectSpecification getObjectSpecification() {
+        return holder.getObjectSpecification();
+    }
+
+    public interface Holder
+            extends ObjectSpecificationProvider,
+                    ObjectAssociationProvider<OneToOneAssociation> {
+
+    }
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java
new file mode 100644
index 0000000000..87107f919c
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import java.util.Optional;
+import java.util.function.Function;
+
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLFieldDefinition;
+
+import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.core.metamodel.object.ManagedObject;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
+import org.apache.causeway.viewer.graphql.model.domain.GqlvPropertyGet;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+
+import lombok.val;
+
+public abstract class GqlvPropertyGetClobAbstract extends GqlvAbstract {
+
+    final Holder holder;
+
+    public GqlvPropertyGetClobAbstract(
+            final Holder holder,
+            final Context context, String name) {
+        super(context);
+        this.holder = holder;
+
+        setField(GraphQLFieldDefinition.newFieldDefinition()
+                    .name(name)
+                    .type(Scalars.GraphQLString)
+                    .build());
+    }
+
+    protected Object fetchDataFromBlob(DataFetchingEnvironment environment, Function<Blob, ?> mapper) {
+        val sourcePojo = BookmarkedPojo.sourceFrom(environment);
+
+        val sourcePojoClass = sourcePojo.getClass();
+        val objectSpecification = context.specificationLoader.loadSpecification(sourcePojoClass);
+        if (objectSpecification == null) {
+            // not expected
+            return null;
+        }
+
+        val association = holder.getObjectAssociation();
+        val managedObject = ManagedObject.adaptSingular(objectSpecification, sourcePojo);
+        val resultManagedObject = association.get(managedObject);
+
+        return Optional.ofNullable(resultManagedObject)
+                .map(ManagedObject::getPojo)
+                .filter(Blob.class::isInstance)
+                .map(Blob.class::cast)
+                .map(mapper)
+                .orElse(null);
+    }
+
+    public interface Holder extends GqlvPropertyGet.Holder {
+    }
+
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobChars.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobChars.java
new file mode 100644
index 0000000000..fd59b02d32
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobChars.java
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import java.util.Optional;
+
+import graphql.schema.DataFetchingEnvironment;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+
+import lombok.val;
+
+public class GqlvPropertyGetClobChars extends GqlvPropertyGetClobAbstract {
+
+    public GqlvPropertyGetClobChars(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "bytes");
+    }
+
+    @Override
+    protected Object fetchData(DataFetchingEnvironment environment) {
+        val sourcePojo = BookmarkedPojo.sourceFrom(environment);
+
+        Optional<Bookmark> bookmarkIfAny = context.bookmarkService.bookmarkFor(sourcePojo);
+        return bookmarkIfAny.map(x -> String.format(
+                "///%s/object/%s:%s/%s/clobChars", "graphql", x.getLogicalTypeName(), x.getIdentifier(), holder.getObjectAssociation().getId())).orElse(null);
+
+    }
+
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobMimeType.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobMimeType.java
new file mode 100644
index 0000000000..9f314203f3
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobMimeType.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import graphql.schema.DataFetchingEnvironment;
+
+import org.apache.causeway.viewer.graphql.model.context.Context;
+
+public class GqlvPropertyGetClobMimeType extends GqlvPropertyGetClobAbstract {
+
+    public GqlvPropertyGetClobMimeType(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "mimeType");
+
+    }
+
+    @Override
+    protected Object fetchData(DataFetchingEnvironment environment) {
+        return fetchDataFromBlob(environment, blob -> blob.getMimeType().toString());
+    }
+
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobName.java
new file mode 100644
index 0000000000..5ea781c578
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobName.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import graphql.schema.DataFetchingEnvironment;
+
+import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+
+public class GqlvPropertyGetClobName extends GqlvPropertyGetClobAbstract {
+
+    public GqlvPropertyGetClobName(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "name");
+    }
+
+    @Override
+    protected Object fetchData(DataFetchingEnvironment environment) {
+        return fetchDataFromBlob(environment, Blob::getName);
+    }
+
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
index ede625c72e..07e4f851bf 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
@@ -41,8 +41,7 @@ public class GqlvScenario
             final Context context) {
         super("Scenario", context);
 
-        this.scenarioName = new GqlvScenarioName(context);
-        addChildField(scenarioName.getField());
+        addChildFieldFor(this.scenarioName = new GqlvScenarioName(context));
 
         this.scenarioStep = new GqlvScenarioStep(context);
         addChildField(scenarioStep.newField("Given"));
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
index a852daaa71..4411e63aa5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
@@ -6,6 +6,8 @@ import java.util.Objects;
 
 import graphql.schema.DataFetchingEnvironment;
 
+import lombok.val;
+
 import org.apache.causeway.applib.services.metamodel.BeanSort;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
@@ -36,16 +38,16 @@ public class GqlvScenarioStep
             if (Objects.requireNonNull(objectSpec.getBeanSort()) == BeanSort.MANAGED_BEAN_CONTRIBUTING) { // @DomainService
                 context.serviceRegistry.lookupBeanById(objectSpec.getLogicalTypeName())
                         .ifPresent(servicePojo -> {
-                            GqlvDomainService gqlvDomainService = GqlvDomainService.of(objectSpec, servicePojo, context);
-                            addChildField(gqlvDomainService.getField());
+                            val gqlvDomainService = GqlvDomainService.of(objectSpec, servicePojo, context);
+                            addChildFieldFor(gqlvDomainService);
                             domainServices.add(gqlvDomainService);
                         });
             }
         });
 
         // add domain object lookup to top-level query
-        for (GqlvDomainObject domainObject : this.domainObjects) {
-            addChildField(domainObject.getField());
+        for (val gqlvDomainObject : this.domainObjects) {
+            addChildFieldFor(gqlvDomainObject);
         }
 
         buildObjectType();
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
index 3fa541054f..20a692f50f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
@@ -57,13 +57,13 @@ public class GqlvTopLevelMutation
 
     public void addAction(ObjectSpecification objectSpec, final ObjectAction objectAction) {
         val gqlvMutationForAction = new GqlvMutationForAction(objectSpec, objectAction, context);
-        addChildField(gqlvMutationForAction.getField());
+        addChildFieldFor(gqlvMutationForAction);
         actions.add(gqlvMutationForAction);
     }
 
     public void addProperty(ObjectSpecification objectSpec, final OneToOneAssociation property) {
         val gqlvMutationForProperty = new GqlvMutationForProperty(objectSpec, property, context);
-        addChildField(gqlvMutationForProperty.getField());
+        addChildFieldFor(gqlvMutationForProperty);
         properties.add(gqlvMutationForProperty);
     }
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
index 1668709db0..b0baf4d332 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
@@ -6,6 +6,8 @@ import java.util.List;
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLObjectType;
 
+import lombok.val;
+
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvDomainObject;
@@ -44,8 +46,8 @@ public class GqlvTopLevelQuery
                 case MANAGED_BEAN_CONTRIBUTING: // @DomainService
                     context.serviceRegistry.lookupBeanById(objectSpec.getLogicalTypeName())
                             .ifPresent(servicePojo -> {
-                                GqlvDomainService gqlvDomainService = GqlvDomainService.of(objectSpec, servicePojo, context);
-                                addChildField(gqlvDomainService.getField());
+                                val gqlvDomainService = GqlvDomainService.of(objectSpec, servicePojo, context);
+                                addChildFieldFor(gqlvDomainService);
                                 domainServices.add(gqlvDomainService);
                             });
                     break;
@@ -53,12 +55,11 @@ public class GqlvTopLevelQuery
         });
 
         // add domain object lookup to top-level query
-        for (GqlvDomainObject domainObject : this.domainObjects) {
-            addChildField(domainObject.getField());
+        for (val gqlvDomainObject : this.domainObjects) {
+            addChildFieldFor(gqlvDomainObject);
         }
 
-        scenario = new GqlvScenario(context);
-        addChildField(scenario.getField());
+        addChildFieldFor(scenario = new GqlvScenario(context));
 
         buildObjectType();
     }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
index 5876019ffb..b18a3e5a64 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
@@ -32,7 +32,6 @@
               version
               cssClass
               iconName
-              grid
             }
           }
         }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
index 1929ae96ef..4548f25fb4 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
@@ -32,8 +32,7 @@
                 "logicalTypeName" : "university.dept.StaffMember",
                 "version" : null,
                 "cssClass" : null,
-                "iconName" : null,
-                "grid" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bs:grid xmlns:bs=\"https://causeway.apache.org/applib/layout/grid/bootstrap3\" xmlns:lnk=\"https://causeway.apache.org/applib/layout/links\" xmlns:cpt=\"https://causeway.apache.org/applib/layout/component\">\n    <bs:row>\n        <bs:col span=\"12\" unreferencedActions=\"true\">\n            <cpt:domainObject bookmarking=\"AS_ROOT\"/>\n        </bs:col>\n    </bs:row>\n    <bs:row>\n        <bs:col span=\"4\">\n        [...]
+                "iconName" : null
               }
             }
           }
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
index 1c28790e91..1f52b24e61 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
@@ -18,7 +18,7 @@
  */
 package org.apache.causeway.viewer.graphql.viewer;
 
-import org.apache.causeway.viewer.graphql.viewer.controller.BlobBytesController;
+import org.apache.causeway.viewer.graphql.viewer.controller.ResourceController;
 
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
@@ -47,7 +47,7 @@ import org.apache.causeway.viewer.graphql.model.CausewayModuleViewerGraphqlModel
         GraphQlWebMvcAutoConfiguration.class,
 
         // controllers
-        BlobBytesController.class
+        ResourceController.class
 })
 @EnableConfigurationProperties({
         GraphQlProperties.class, GraphQlCorsProperties.class
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
similarity index 71%
rename from viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
rename to viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
index a72670ce79..2b388ce3cf 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
@@ -2,12 +2,14 @@ package org.apache.causeway.viewer.graphql.viewer.controller;
 
 import javax.inject.Inject;
 
+import org.apache.causeway.applib.value.Clob;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
 
 import org.springframework.http.ContentDisposition;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
+import org.springframework.util.MimeType;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -27,7 +29,7 @@ import java.util.Optional;
 @RestController()
 @RequestMapping("/graphql/object")
 @RequiredArgsConstructor(onConstructor_ = {@Inject})
-public class BlobBytesController {
+public class ResourceController {
 
     private final BookmarkService bookmarkService;
     private final ObjectManager objectManager;
@@ -38,23 +40,44 @@ public class BlobBytesController {
             @PathVariable final String id,
             @PathVariable final String propertyId) {
 
-        return bookmarkService.lookup(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, id))
-                .map(objectManager::adapt)
-                .map(managedObject -> ManagedObjectAndPropertyIfAny.of(managedObject, managedObject.getSpecification().getProperty(propertyId)))
-                .filter(ManagedObjectAndPropertyIfAny::isPropertyPresent)
-                .map(ManagedObjectAndProperty::of)
-                .map(ManagedObjectAndProperty::value)
-                .map(ManagedObject::getPojo)
+        return valueOf(logicalTypeName, id, propertyId)
                 .filter(Blob.class::isInstance)
                 .map(Blob.class::cast)
                 .map(blob -> ResponseEntity.ok()
-                        .contentType(MediaType.APPLICATION_PDF)
+                        .contentType(MediaType.asMediaType(MimeType.valueOf(blob.getMimeType().toString())))
                         .header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(blob.getName()).build().toString())
                         .contentLength(blob.getBytes().length)
                         .body(blob.getBytes()))
                 .orElse(ResponseEntity.notFound().build());
     }
 
+    @GetMapping(value = "/{logicalTypeName}:{id}/{propertyId}/clobChars")
+    public ResponseEntity<CharSequence> propertyClobChars(
+            @PathVariable final String logicalTypeName,
+            @PathVariable final String id,
+            @PathVariable final String propertyId) {
+
+        return valueOf(logicalTypeName, id, propertyId)
+                .filter(Clob.class::isInstance)
+                .map(Clob.class::cast)
+                .map(clob -> ResponseEntity.ok()
+                        .contentType(MediaType.asMediaType(MimeType.valueOf(clob.getMimeType().toString())))
+                        .header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(clob.getName()).build().toString())
+                        .contentLength(clob.getChars().length())
+                        .body(clob.getChars()))
+                .orElse(ResponseEntity.notFound().build());
+    }
+
+    private Optional<Object> valueOf(String logicalTypeName, String id, String propertyId) {
+        return bookmarkService.lookup(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, id))
+                .map(objectManager::adapt)
+                .map(managedObject -> ManagedObjectAndPropertyIfAny.of(managedObject, managedObject.getSpecification().getProperty(propertyId)))
+                .filter(ManagedObjectAndPropertyIfAny::isPropertyPresent)
+                .map(ManagedObjectAndProperty::of)
+                .map(ManagedObjectAndProperty::value)
+                .map(ManagedObject::getPojo);
+    }
+
     @Value(staticConstructor = "of")
     private static class ManagedObjectAndPropertyIfAny {
         ManagedObject owningObject;


(causeway) 06/08: CAUSEWAY-3676: fixes integ test, adds clob as url, speeds up interpolation

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 411b81cb00419cd6931558dda6f7d2a9f323f6fe
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Feb 16 17:51:24 2024 +0000

    CAUSEWAY-3676: fixes integ test, adds clob as url, speeds up interpolation
---
 .../graphql/model/domain/GqlvAbstractCustom.java   |   7 +-
 .../viewer/graphql/model/domain/GqlvAction.java    |  13 +-
 .../graphql/model/domain/GqlvActionParam.java      |  18 +++
 .../graphql/model/domain/GqlvActionParams.java     |   5 +
 .../graphql/model/domain/GqlvCollection.java       |  10 ++
 .../graphql/model/domain/GqlvDomainService.java    |   4 +
 .../viewer/graphql/model/domain/GqlvMeta.java      |  16 +++
 .../viewer/graphql/model/domain/GqlvProperty.java  |  22 +++-
 .../graphql/model/domain/GqlvPropertyGetBlob.java  |  12 ++
 .../graphql/model/domain/GqlvPropertyGetClob.java  |  10 ++
 .../graphql/model/domain/GqlvScenarioStep.java     |   4 +
 .../model/toplevel/GqlvTopLevelMutation.java       |   4 +
 .../schema/GqlSchemaQuery_print_IntegTest.java     |  31 -----
 ...tegTest.java => GqlSchema_print_IntegTest.java} |   4 +-
 viewers/graphql/test/src/test/resources/schema.gql | 145 ++++++++++-----------
 15 files changed, 192 insertions(+), 113 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
index 6c955fbb92..17e762136d 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
@@ -63,7 +63,8 @@ public abstract class GqlvAbstractCustom extends GqlvAbstract implements Parent
 
     protected final void addChildFieldFor(@Nullable GqlvAbstract hasField) {
         if (isBuilt()) {
-            throw new IllegalStateException("Object type has already been built");
+            // the type was built already
+            return;
         }
         if (hasField == null) {
             return;
@@ -72,6 +73,10 @@ public abstract class GqlvAbstractCustom extends GqlvAbstract implements Parent
     }
 
     void addChildField(GraphQLFieldDefinition childField) {
+        if (isBuilt()) {
+            // the type was built already
+            return;
+        }
         if (childField != null) {
             gqlObjectTypeBuilder.field(childField);
         }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
index 48cae6a1af..b81a1a6b56 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
@@ -51,7 +51,7 @@ public class GqlvAction
                    GqlvActionInvoke.Holder,
                    GqlvActionValidity.Holder,
                    GqlvActionParams.Holder,
-        Parent {
+                   Parent {
 
     private final GqlvMemberHidden<ObjectAction> hidden;
     private final GqlvMemberDisabled<ObjectAction> disabled;
@@ -71,6 +71,14 @@ public class GqlvAction
             final Context context) {
         super(holder, objectAction, TypeNames.actionTypeNameFor(holder.getObjectSpecification(), objectAction), context);
 
+        if(isBuilt()) {
+            this.hidden = null;
+            this.disabled = null;
+            this.validate = null;
+            this.invoke = null;
+            this.params = null;
+            return;
+        }
         addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
         addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
         addChildFieldFor(this.validate = new GqlvActionValidity(this, context));
@@ -253,6 +261,9 @@ public class GqlvAction
 
     @Override
     protected void addDataFetchersForChildren() {
+        if(hidden == null) {
+            return;
+        }
         hidden.addDataFetcher(this);
         disabled.addDataFetcher(this);
         validate.addDataFetcher(this);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
index a989c38b4a..0f47e2c7b7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
@@ -78,6 +78,20 @@ public class GqlvActionParam
         this.objectActionParameter = objectActionParameter;
         this.paramNum = paramNum;
 
+        if (isBuilt()) {
+            this.hidden = null;
+            this.disabled = null;
+            this.choices = null;
+            this.autoComplete = null;
+            this.default_ = null;
+            this.validate = null;
+            this.datatype = null;
+
+            // nothing else to be done
+            return;
+        }
+
+
         addChildFieldFor(this.hidden = new GqlvActionParamHidden(this, context));
         addChildFieldFor(this.disabled = new GqlvActionParamDisabled(this, context));
         addChildFieldFor(this.choices = new GqlvActionParamChoices(this, context));
@@ -107,6 +121,10 @@ public class GqlvActionParam
     @Override
     protected void addDataFetchersForChildren() {
 
+        if (hidden == null) {
+            return;
+        }
+
         hidden.addDataFetcher(this);
         disabled.addDataFetcher(this);
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
index 5e4b9e05ef..0f779e6bc5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
@@ -56,6 +56,11 @@ public class GqlvActionParams
         super(TypeNames.actionParamsTypeNameFor(holder.getObjectSpecification(), holder.getObjectAction()), context);
         this.holder = holder;
 
+        if (isBuilt()) {
+            // nothing else to be done
+            return;
+        }
+
         val idx = new AtomicInteger(0);
         holder.getObjectAction().getParameters().forEach(objectActionParameter -> {
             addParam(objectActionParameter, idx.getAndIncrement());
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
index c5b4ff6343..90a3b60a57 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvCollection.java
@@ -41,6 +41,13 @@ public class GqlvCollection
     ) {
         super(holder, oneToManyAssociation, TypeNames.collectionTypeNameFor(holder.getObjectSpecification(), oneToManyAssociation), context);
 
+        if(isBuilt()) {
+            this.hidden = null;
+            this.disabled = null;
+            this.get = null;
+            this.datatype = null;
+            return;
+        }
         addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
         addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
         addChildFieldFor(this.get = new GqlvCollectionGet(this, context));
@@ -57,6 +64,9 @@ public class GqlvCollection
 
     @Override
     protected void addDataFetchersForChildren() {
+        if(hidden == null) {
+            return;
+        }
         hidden.addDataFetcher(this);
         disabled.addDataFetcher(this);
         get.addDataFetcher(this);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
index 845d93fd0a..85fa14ff74 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
@@ -60,6 +60,10 @@ public class GqlvDomainService
         this.objectSpecification = objectSpecification;
         this.servicePojo = servicePojo;
 
+        if(isBuilt()) {
+            return;
+        }
+
         addActions();
         if (hasActions()) {
             buildObjectTypeAndField(TypeNames.objectTypeNameFor(this.objectSpecification));
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
index 9dfa5ede87..832055e349 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
@@ -58,6 +58,19 @@ public class GqlvMeta extends GqlvAbstractCustom {
         super(TypeNames.metaTypeNameFor(holder.getObjectSpecification()), context);
         this.holder = holder;
 
+        if(isBuilt()) {
+            this.metaId = null;
+            this.metaLogicalTypeName = null;
+            this.metaVersion = null;
+            this.metaTitle = null;
+            this.metaIconName = null;
+            this.metaCssClass = null;
+            this.metaLayout = null;
+            this.metaGrid = null;
+            this.metaSaveAs = null;
+            return;
+        }
+
         addChildFieldFor(this.metaId = new GqlvMetaId(context));
         addChildFieldFor(this.metaLogicalTypeName = new GqlvMetaLogicalTypeName(context));
         addChildFieldFor(this.metaVersion = isEntity() ? new GqlvMetaVersion(context) : null);
@@ -78,6 +91,9 @@ public class GqlvMeta extends GqlvAbstractCustom {
 
     @Override
     protected void addDataFetchersForChildren() {
+        if (metaId == null) {
+            return;
+        }
         metaId.addDataFetcher(this);
         metaLogicalTypeName.addDataFetcher(this);
         if (isEntity()) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
index 4cb27880ab..eda7109ed5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
@@ -68,16 +68,26 @@ public class GqlvProperty
             final Context context) {
         super(holder, oneToOneAssociation, TypeNames.propertyTypeNameFor(holder.getObjectSpecification(), oneToOneAssociation), context);
 
+        if (isBuilt()) {
+            this.hidden = null;
+            this.disabled = null;
+            this.choices = null;
+            this.autoComplete = null;
+            this.validate = null;
+            this.set = null;
+            this.datatype = null;
+            this.get = null;
+            return;
+        }
         addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
         addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
 
-        this.get = isBlob() ? new GqlvPropertyGetBlob(this, context) : isClob() ? new GqlvPropertyGetClob(this, context) : new GqlvPropertyGet(this, context);
         addChildFieldFor(
-                isBlob()
-                    ? new GqlvPropertyGetBlob(this, context)
-                    : isClob()
-                        ? new GqlvPropertyGetClob(this, context)
-                        : new GqlvPropertyGet(this, context)
+                this.get = isBlob()
+                            ? new GqlvPropertyGetBlob(this, context)
+                            : isClob()
+                                ? new GqlvPropertyGetClob(this, context)
+                                : new GqlvPropertyGet(this, context)
         );
 
         addChildFieldFor(this.validate = new GqlvPropertyValidate(this, context));
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java
index bb9e3d830d..6380205c24 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java
@@ -43,8 +43,17 @@ public class GqlvPropertyGetBlob
             final Holder holder,
             final Context context) {
         super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember()), context);
+
         this.holder = holder;
 
+        if (isBuilt()) {
+            // type already exists, nothing else to do.
+            this.blobName = null;
+            this.blobMimeType = null;
+            this.blobBytes = null;
+            return;
+        }
+
         addChildFieldFor(blobName = new GqlvPropertyGetBlobBytes(this, context));
         addChildFieldFor(blobMimeType = new GqlvPropertyGetBlobMimeType(this, context));
         addChildFieldFor(blobBytes = new GqlvPropertyGetBlobName(this, context));
@@ -62,6 +71,9 @@ public class GqlvPropertyGetBlob
 
     @Override
     protected void addDataFetchersForChildren() {
+        if (blobName == null) {
+            return;
+        }
         blobName.addDataFetcher(this);
         blobMimeType.addDataFetcher(this);
         blobBytes.addDataFetcher(this);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java
index 1944815515..6983f85fd7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClob.java
@@ -45,6 +45,13 @@ public class GqlvPropertyGetClob
         super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember()), context);
         this.holder = holder;
 
+        if(isBuilt()) {
+            this.clobChars = null;
+            this.clobMimeType = null;
+            this.clobName = null;
+            return;
+        }
+
         addChildFieldFor(clobChars = new GqlvPropertyGetClobChars(this, context));
         addChildFieldFor(clobMimeType = new GqlvPropertyGetClobMimeType(this, context));
         addChildFieldFor(clobName = new GqlvPropertyGetClobName(this, context));
@@ -62,6 +69,9 @@ public class GqlvPropertyGetClob
 
     @Override
     protected void addDataFetchersForChildren() {
+        if(clobChars == null) {
+            return;
+        }
         clobChars.addDataFetcher(this);
         clobMimeType.addDataFetcher(this);
         clobName.addDataFetcher(this);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
index 785f4dcf93..7b9718e774 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
@@ -21,6 +21,10 @@ public class GqlvScenarioStep
     public GqlvScenarioStep(final Context context) {
         super("ScenarioStep", context);
 
+        if(isBuilt()) {
+            return;
+        }
+
         context.objectSpecifications().forEach(objectSpec -> {
             switch (objectSpec.getBeanSort()) {
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
index 45c75039ae..7e7ff48946 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
@@ -29,6 +29,10 @@ public class GqlvTopLevelMutation
     public GqlvTopLevelMutation(final Context context) {
         super("Mutation", context);
 
+        if (isBuilt()) {
+            // type already exists, nothing else to do.
+            return;
+        }
         val objectSpecifications = context.objectSpecifications();
 
         objectSpecifications.forEach(objectSpec -> {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
deleted file mode 100644
index 275810d940..0000000000
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.causeway.viewer.graphql.viewer.test.schema;
-
-import org.junit.jupiter.api.Order;
-
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.transaction.annotation.Transactional;
-
-@Order(0)
-@Transactional
-@DirtiesContext
-public class GqlSchemaQuery_print_IntegTest extends AbstractGqlSchema_print_IntegTest {
-
-}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/AbstractGqlSchema_print_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchema_print_IntegTest.java
similarity index 94%
rename from viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/AbstractGqlSchema_print_IntegTest.java
rename to viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchema_print_IntegTest.java
index dbcca757cc..d55627dfa0 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/AbstractGqlSchema_print_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchema_print_IntegTest.java
@@ -31,6 +31,7 @@ import org.approvaltests.core.Options;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.transaction.annotation.Transactional;
 
 import org.apache.causeway.commons.io.TextUtils;
@@ -44,7 +45,8 @@ import static org.apache.causeway.commons.internal.assertions._Assert.assertNotN
 import lombok.val;
 
 @Transactional
-public abstract class AbstractGqlSchema_print_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
+@DirtiesContext
+public class GqlSchema_print_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
 
     @Inject private CausewaySystemEnvironment causewaySystemEnvironment;
     @Inject private SpecificationLoader specificationLoader;
diff --git a/viewers/graphql/test/src/test/resources/schema.gql b/viewers/graphql/test/src/test/resources/schema.gql
index 4aca251bf4..2c63dfb7fe 100644
--- a/viewers/graphql/test/src/test/resources/schema.gql
+++ b/viewers/graphql/test/src/test/resources/schema.gql
@@ -23,46 +23,46 @@ directive @specifiedBy(
   ) on SCALAR
 
 type Mutation {
-  causeway_applib_PropertyNode__mixedIn(_gqlv_target: causeway_applib_PropertyNode__gqlv_input, mixedIn: Boolean!): causeway_applib_PropertyNode
-  causeway_applib_node_ActionNode__mixedIn(_gqlv_target: causeway_applib_node_ActionNode__gqlv_input, mixedIn: Boolean!): causeway_applib_node_ActionNode
-  causeway_applib_node_CollectionNode__mixedIn(_gqlv_target: causeway_applib_node_CollectionNode__gqlv_input, mixedIn: Boolean!): causeway_applib_node_CollectionNode
-  causeway_applib_node_FacetNode__shadowed(_gqlv_target: causeway_applib_node_FacetNode__gqlv_input, shadowed: Boolean!): causeway_applib_node_FacetNode
-  causeway_conf_ConfigurationProperty__key(_gqlv_target: causeway_conf_ConfigurationProperty__gqlv_input, key: String!): causeway_conf_ConfigurationProperty
-  causeway_conf_ConfigurationProperty__value(_gqlv_target: causeway_conf_ConfigurationProperty__gqlv_input, value: String!): causeway_conf_ConfigurationProperty
-  causeway_schema_metamodel_v2_DomainClassDto__actions(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, actions: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__annotations(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, annotations: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__collections(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, collections: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__facets(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, facets: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__id(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, id: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__majorVersion(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, majorVersion: String): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__minorVersion(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, minorVersion: String): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__properties(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, properties: String!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_schema_metamodel_v2_DomainClassDto__service(_gqlv_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, service: Boolean!): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_testing_fixtures_FixtureResult__fixtureScriptClassName(_gqlv_target: causeway_testing_fixtures_FixtureResult__gqlv_input, fixtureScriptClassName: String): causeway_testing_fixtures_FixtureResult
-  causeway_testing_fixtures_FixtureResult__key(_gqlv_target: causeway_testing_fixtures_FixtureResult__gqlv_input, key: String!): causeway_testing_fixtures_FixtureResult
-  causeway_testing_fixtures_FixtureResult__object(_gqlv_target: causeway_testing_fixtures_FixtureResult__gqlv_input, object: String!): causeway_testing_fixtures_FixtureResult
-  org_apache_causeway_core_metamodel_inspect_model_MemberNode__mixedIn(_gqlv_target: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input, mixedIn: Boolean!): org_apache_causeway_core_metamodel_inspect_model_MemberNode
-  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__friendlyName(_gqlv_target: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input, friendlyName: String!): org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript
+  causeway_applib_PropertyNode__mixedIn(_target: causeway_applib_PropertyNode__gqlv_input, mixedIn: Boolean!): causeway_applib_PropertyNode
+  causeway_applib_node_ActionNode__mixedIn(_target: causeway_applib_node_ActionNode__gqlv_input, mixedIn: Boolean!): causeway_applib_node_ActionNode
+  causeway_applib_node_CollectionNode__mixedIn(_target: causeway_applib_node_CollectionNode__gqlv_input, mixedIn: Boolean!): causeway_applib_node_CollectionNode
+  causeway_applib_node_FacetNode__shadowed(_target: causeway_applib_node_FacetNode__gqlv_input, shadowed: Boolean!): causeway_applib_node_FacetNode
+  causeway_conf_ConfigurationProperty__key(_target: causeway_conf_ConfigurationProperty__gqlv_input, key: String!): causeway_conf_ConfigurationProperty
+  causeway_conf_ConfigurationProperty__value(_target: causeway_conf_ConfigurationProperty__gqlv_input, value: String!): causeway_conf_ConfigurationProperty
+  causeway_schema_metamodel_v2_DomainClassDto__actions(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, actions: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__annotations(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, annotations: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__collections(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, collections: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__facets(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, facets: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__id(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, id: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__majorVersion(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, majorVersion: String): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__minorVersion(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, minorVersion: String): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__properties(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, properties: String!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_schema_metamodel_v2_DomainClassDto__service(_target: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input, service: Boolean!): causeway_schema_metamodel_v2_DomainClassDto
+  causeway_testing_fixtures_FixtureResult__fixtureScriptClassName(_target: causeway_testing_fixtures_FixtureResult__gqlv_input, fixtureScriptClassName: String): causeway_testing_fixtures_FixtureResult
+  causeway_testing_fixtures_FixtureResult__key(_target: causeway_testing_fixtures_FixtureResult__gqlv_input, key: String!): causeway_testing_fixtures_FixtureResult
+  causeway_testing_fixtures_FixtureResult__object(_target: causeway_testing_fixtures_FixtureResult__gqlv_input, object: String!): causeway_testing_fixtures_FixtureResult
+  org_apache_causeway_core_metamodel_inspect_model_MemberNode__mixedIn(_target: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input, mixedIn: Boolean!): org_apache_causeway_core_metamodel_inspect_model_MemberNode
+  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__friendlyName(_target: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input, friendlyName: String!): org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript
   university_admin_AdminMenu__actionWithDisabledParam(firstParam: String!, secondParam: String!, thirdParameter: String!): String
   university_admin_AdminMenu__actionWithHiddenParam(firstParam: String!, secondParam: String!): String
   university_admin_AdminMenu__adminAction: String
   university_admin_AdminMenu__otherAdminAction: String
-  university_dept_Department__addStaffMember(_gqlv_target: university_dept_Department__gqlv_input, staffMember: university_dept_StaffMember__gqlv_input!): university_dept_Department
-  university_dept_Department__addStaffMembers(_gqlv_target: university_dept_Department__gqlv_input, staffMembers: [university_dept_StaffMember__gqlv_input]): university_dept_Department
-  university_dept_Department__changeDeptHead(_gqlv_target: university_dept_Department__gqlv_input, newDeptHead: university_dept_DeptHead__gqlv_input!): university_dept_Department
-  university_dept_Department__changeName(_gqlv_target: university_dept_Department__gqlv_input, newName: String!): university_dept_Department
-  university_dept_Department__deptHead(_gqlv_target: university_dept_Department__gqlv_input, deptHead: university_dept_DeptHead__gqlv_input): university_dept_Department
-  university_dept_Department__name(_gqlv_target: university_dept_Department__gqlv_input, name: String!): university_dept_Department
-  university_dept_Department__removeStaffMember(_gqlv_target: university_dept_Department__gqlv_input, staffMember: university_dept_StaffMember__gqlv_input!): university_dept_Department
+  university_dept_Department__addStaffMember(_target: university_dept_Department__gqlv_input, staffMember: university_dept_StaffMember__gqlv_input!): university_dept_Department
+  university_dept_Department__addStaffMembers(_target: university_dept_Department__gqlv_input, staffMembers: [university_dept_StaffMember__gqlv_input]): university_dept_Department
+  university_dept_Department__changeDeptHead(_target: university_dept_Department__gqlv_input, newDeptHead: university_dept_DeptHead__gqlv_input!): university_dept_Department
+  university_dept_Department__changeName(_target: university_dept_Department__gqlv_input, newName: String!): university_dept_Department
+  university_dept_Department__deptHead(_target: university_dept_Department__gqlv_input, deptHead: university_dept_DeptHead__gqlv_input): university_dept_Department
+  university_dept_Department__name(_target: university_dept_Department__gqlv_input, name: String!): university_dept_Department
+  university_dept_Department__removeStaffMember(_target: university_dept_Department__gqlv_input, staffMember: university_dept_StaffMember__gqlv_input!): university_dept_Department
   university_dept_Departments__createDepartment(deptHead: university_dept_DeptHead__gqlv_input, name: String!): university_dept_Department
-  university_dept_DeptHead__changeDepartment(_gqlv_target: university_dept_DeptHead__gqlv_input, department: university_dept_Department__gqlv_input!): university_dept_DeptHead
-  university_dept_DeptHead__changeName(_gqlv_target: university_dept_DeptHead__gqlv_input, newName: String!): university_dept_DeptHead
-  university_dept_DeptHead__department(_gqlv_target: university_dept_DeptHead__gqlv_input, department: university_dept_Department__gqlv_input): university_dept_DeptHead
-  university_dept_DeptHead__name(_gqlv_target: university_dept_DeptHead__gqlv_input, name: String): university_dept_DeptHead
-  university_dept_StaffMember__department(_gqlv_target: university_dept_StaffMember__gqlv_input, department: university_dept_Department__gqlv_input): university_dept_StaffMember
-  university_dept_StaffMember__grade(_gqlv_target: university_dept_StaffMember__gqlv_input, grade: org_apache_causeway_viewer_graphql_viewer_test_domain_dept_Grade__gqlv_enum!): university_dept_StaffMember
-  university_dept_StaffMember__name(_gqlv_target: university_dept_StaffMember__gqlv_input, name: String!): university_dept_StaffMember
-  university_dept_StaffMember__photo(_gqlv_target: university_dept_StaffMember__gqlv_input, photo: String): university_dept_StaffMember
+  university_dept_DeptHead__changeDepartment(_target: university_dept_DeptHead__gqlv_input, department: university_dept_Department__gqlv_input!): university_dept_DeptHead
+  university_dept_DeptHead__changeName(_target: university_dept_DeptHead__gqlv_input, newName: String!): university_dept_DeptHead
+  university_dept_DeptHead__department(_target: university_dept_DeptHead__gqlv_input, department: university_dept_Department__gqlv_input): university_dept_DeptHead
+  university_dept_DeptHead__name(_target: university_dept_DeptHead__gqlv_input, name: String): university_dept_DeptHead
+  university_dept_StaffMember__department(_target: university_dept_StaffMember__gqlv_input, department: university_dept_Department__gqlv_input): university_dept_StaffMember
+  university_dept_StaffMember__grade(_target: university_dept_StaffMember__gqlv_input, grade: org_apache_causeway_viewer_graphql_viewer_test_domain_dept_Grade__gqlv_enum!): university_dept_StaffMember
+  university_dept_StaffMember__name(_target: university_dept_StaffMember__gqlv_input, name: String!): university_dept_StaffMember
+  university_dept_StaffMember__photo(_target: university_dept_StaffMember__gqlv_input, photo: String): university_dept_StaffMember
   university_dept_Staff__createStaffMember(department: university_dept_Department__gqlv_input!, name: String!): university_dept_StaffMember
 }
 
@@ -171,7 +171,7 @@ type ScenarioStep {
 }
 
 type causeway_applib_DomainObjectList {
-  _gqlv_meta: causeway_applib_DomainObjectList__gqlv_meta
+  _meta: causeway_applib_DomainObjectList__gqlv_meta
   actionArguments: causeway_applib_DomainObjectList__actionArguments__gqlv_property
   actionId: causeway_applib_DomainObjectList__actionId__gqlv_property
   actionOwningFqcn: causeway_applib_DomainObjectList__actionOwningFqcn__gqlv_property
@@ -243,7 +243,7 @@ type causeway_applib_DomainObjectList__title__gqlv_property {
 }
 
 type causeway_applib_FacetGroupNode {
-  _gqlv_meta: causeway_applib_FacetGroupNode__gqlv_meta
+  _meta: causeway_applib_FacetGroupNode__gqlv_meta
   childNodes: causeway_applib_FacetGroupNode__childNodes__gqlv_collection
   facets: causeway_applib_FacetGroupNode__facets__gqlv_property
   parentNode: causeway_applib_FacetGroupNode__parentNode__gqlv_property
@@ -284,7 +284,7 @@ type causeway_applib_FacetGroupNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_ParameterNode {
-  _gqlv_meta: causeway_applib_ParameterNode__gqlv_meta
+  _meta: causeway_applib_ParameterNode__gqlv_meta
   childNodes: causeway_applib_ParameterNode__childNodes__gqlv_collection
   parameter: causeway_applib_ParameterNode__parameter__gqlv_property
   parentNode: causeway_applib_ParameterNode__parentNode__gqlv_property
@@ -326,7 +326,7 @@ type causeway_applib_ParameterNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_PropertyNode {
-  _gqlv_meta: causeway_applib_PropertyNode__gqlv_meta
+  _meta: causeway_applib_PropertyNode__gqlv_meta
   childNodes: causeway_applib_PropertyNode__childNodes__gqlv_collection
   mixedIn: causeway_applib_PropertyNode__mixedIn__gqlv_property
   parentNode: causeway_applib_PropertyNode__parentNode__gqlv_property
@@ -378,7 +378,7 @@ type causeway_applib_PropertyNode__property__gqlv_property {
 }
 
 type causeway_applib_RoleMemento {
-  _gqlv_meta: causeway_applib_RoleMemento__gqlv_meta
+  _meta: causeway_applib_RoleMemento__gqlv_meta
   description: causeway_applib_RoleMemento__description__gqlv_property
   name: causeway_applib_RoleMemento__name__gqlv_property
 }
@@ -413,7 +413,7 @@ type causeway_applib_RoleMemento__name__gqlv_property {
 }
 
 type causeway_applib_TypeNode {
-  _gqlv_meta: causeway_applib_TypeNode__gqlv_meta
+  _meta: causeway_applib_TypeNode__gqlv_meta
   childNodes: causeway_applib_TypeNode__childNodes__gqlv_collection
   domainClassDto: causeway_applib_TypeNode__domainClassDto__gqlv_property
   parentNode: causeway_applib_TypeNode__parentNode__gqlv_property
@@ -454,7 +454,7 @@ type causeway_applib_TypeNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_UserMemento {
-  _gqlv_meta: causeway_applib_UserMemento__gqlv_meta
+  _meta: causeway_applib_UserMemento__gqlv_meta
   authenticationCode: causeway_applib_UserMemento__authenticationCode__gqlv_property
   authenticationSource: causeway_applib_UserMemento__authenticationSource__gqlv_property
   avatarUrl: causeway_applib_UserMemento__avatarUrl__gqlv_property
@@ -590,7 +590,7 @@ type causeway_applib_UserMenu__me__gqlv_action {
 }
 
 type causeway_applib_node_ActionNode {
-  _gqlv_meta: causeway_applib_node_ActionNode__gqlv_meta
+  _meta: causeway_applib_node_ActionNode__gqlv_meta
   action: causeway_applib_node_ActionNode__action__gqlv_property
   childNodes: causeway_applib_node_ActionNode__childNodes__gqlv_collection
   mixedIn: causeway_applib_node_ActionNode__mixedIn__gqlv_property
@@ -642,7 +642,7 @@ type causeway_applib_node_ActionNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_node_CollectionNode {
-  _gqlv_meta: causeway_applib_node_CollectionNode__gqlv_meta
+  _meta: causeway_applib_node_CollectionNode__gqlv_meta
   childNodes: causeway_applib_node_CollectionNode__childNodes__gqlv_collection
   collection: causeway_applib_node_CollectionNode__collection__gqlv_property
   mixedIn: causeway_applib_node_CollectionNode__mixedIn__gqlv_property
@@ -694,7 +694,7 @@ type causeway_applib_node_CollectionNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_node_FacetAttrNode {
-  _gqlv_meta: causeway_applib_node_FacetAttrNode__gqlv_meta
+  _meta: causeway_applib_node_FacetAttrNode__gqlv_meta
   childNodes: causeway_applib_node_FacetAttrNode__childNodes__gqlv_collection
   facetAttr: causeway_applib_node_FacetAttrNode__facetAttr__gqlv_property
   parentNode: causeway_applib_node_FacetAttrNode__parentNode__gqlv_property
@@ -736,7 +736,7 @@ type causeway_applib_node_FacetAttrNode__parentNode__gqlv_property {
 }
 
 type causeway_applib_node_FacetNode {
-  _gqlv_meta: causeway_applib_node_FacetNode__gqlv_meta
+  _meta: causeway_applib_node_FacetNode__gqlv_meta
   childNodes: causeway_applib_node_FacetNode__childNodes__gqlv_collection
   facet: causeway_applib_node_FacetNode__facet__gqlv_property
   parentNode: causeway_applib_node_FacetNode__parentNode__gqlv_property
@@ -798,7 +798,7 @@ type causeway_conf_ConfigurationMenu__configuration__gqlv_action {
 }
 
 type causeway_conf_ConfigurationProperty {
-  _gqlv_meta: causeway_conf_ConfigurationProperty__gqlv_meta
+  _meta: causeway_conf_ConfigurationProperty__gqlv_meta
   key: causeway_conf_ConfigurationProperty__key__gqlv_property
   value: causeway_conf_ConfigurationProperty__value__gqlv_property
 }
@@ -833,7 +833,7 @@ type causeway_conf_ConfigurationProperty__value__gqlv_property {
 }
 
 type causeway_conf_ConfigurationViewmodel {
-  _gqlv_meta: causeway_conf_ConfigurationViewmodel__gqlv_meta
+  _meta: causeway_conf_ConfigurationViewmodel__gqlv_meta
   environment: causeway_conf_ConfigurationViewmodel__environment__gqlv_collection
   primary: causeway_conf_ConfigurationViewmodel__primary__gqlv_collection
   secondary: causeway_conf_ConfigurationViewmodel__secondary__gqlv_collection
@@ -872,7 +872,7 @@ type causeway_conf_ConfigurationViewmodel__secondary__gqlv_collection {
 }
 
 type causeway_feat_ApplicationFeatureViewModel {
-  _gqlv_meta: causeway_feat_ApplicationFeatureViewModel__gqlv_meta
+  _meta: causeway_feat_ApplicationFeatureViewModel__gqlv_meta
   memberName: causeway_feat_ApplicationFeatureViewModel__memberName__gqlv_property
   namespaceName: causeway_feat_ApplicationFeatureViewModel__namespaceName__gqlv_property
   parent: causeway_feat_ApplicationFeatureViewModel__parent__gqlv_property
@@ -926,7 +926,7 @@ type causeway_feat_ApplicationFeatureViewModel__typeSimpleName__gqlv_property {
 }
 
 type causeway_feat_ApplicationNamespace {
-  _gqlv_meta: causeway_feat_ApplicationNamespace__gqlv_meta
+  _meta: causeway_feat_ApplicationNamespace__gqlv_meta
   contents: causeway_feat_ApplicationNamespace__contents__gqlv_collection
   memberName: causeway_feat_ApplicationNamespace__memberName__gqlv_property
   namespaceName: causeway_feat_ApplicationNamespace__namespaceName__gqlv_property
@@ -987,7 +987,7 @@ type causeway_feat_ApplicationNamespace__typeSimpleName__gqlv_property {
 }
 
 type causeway_feat_ApplicationType {
-  _gqlv_meta: causeway_feat_ApplicationType__gqlv_meta
+  _meta: causeway_feat_ApplicationType__gqlv_meta
   actions: causeway_feat_ApplicationType__actions__gqlv_collection
   collections: causeway_feat_ApplicationType__collections__gqlv_collection
   memberName: causeway_feat_ApplicationType__memberName__gqlv_property
@@ -998,7 +998,7 @@ type causeway_feat_ApplicationType {
 }
 
 type causeway_feat_ApplicationTypeAction {
-  _gqlv_meta: causeway_feat_ApplicationTypeAction__gqlv_meta
+  _meta: causeway_feat_ApplicationTypeAction__gqlv_meta
   actionSemantics: causeway_feat_ApplicationTypeAction__actionSemantics__gqlv_property
   memberName: causeway_feat_ApplicationTypeAction__memberName__gqlv_property
   namespaceName: causeway_feat_ApplicationTypeAction__namespaceName__gqlv_property
@@ -1073,7 +1073,7 @@ type causeway_feat_ApplicationTypeAction__typeSimpleName__gqlv_property {
 }
 
 type causeway_feat_ApplicationTypeCollection {
-  _gqlv_meta: causeway_feat_ApplicationTypeCollection__gqlv_meta
+  _meta: causeway_feat_ApplicationTypeCollection__gqlv_meta
   derived: causeway_feat_ApplicationTypeCollection__derived__gqlv_property
   elementType: causeway_feat_ApplicationTypeCollection__elementType__gqlv_property
   memberName: causeway_feat_ApplicationTypeCollection__memberName__gqlv_property
@@ -1147,7 +1147,7 @@ type causeway_feat_ApplicationTypeCollection__typeSimpleName__gqlv_property {
 }
 
 type causeway_feat_ApplicationTypeMember {
-  _gqlv_meta: causeway_feat_ApplicationTypeMember__gqlv_meta
+  _meta: causeway_feat_ApplicationTypeMember__gqlv_meta
   memberName: causeway_feat_ApplicationTypeMember__memberName__gqlv_property
   namespaceName: causeway_feat_ApplicationTypeMember__namespaceName__gqlv_property
   parent: causeway_feat_ApplicationTypeMember__parent__gqlv_property
@@ -1201,7 +1201,7 @@ type causeway_feat_ApplicationTypeMember__typeSimpleName__gqlv_property {
 }
 
 type causeway_feat_ApplicationTypeProperty {
-  _gqlv_meta: causeway_feat_ApplicationTypeProperty__gqlv_meta
+  _meta: causeway_feat_ApplicationTypeProperty__gqlv_meta
   derived: causeway_feat_ApplicationTypeProperty__derived__gqlv_property
   maxLength: causeway_feat_ApplicationTypeProperty__maxLength__gqlv_property
   memberName: causeway_feat_ApplicationTypeProperty__memberName__gqlv_property
@@ -1362,7 +1362,7 @@ type causeway_feat_ApplicationType__typeSimpleName__gqlv_property {
 }
 
 type causeway_schema_metamodel_v2_DomainClassDto {
-  _gqlv_meta: causeway_schema_metamodel_v2_DomainClassDto__gqlv_meta
+  _meta: causeway_schema_metamodel_v2_DomainClassDto__gqlv_meta
   actions: causeway_schema_metamodel_v2_DomainClassDto__actions__gqlv_property
   annotations: causeway_schema_metamodel_v2_DomainClassDto__annotations__gqlv_property
   collections: causeway_schema_metamodel_v2_DomainClassDto__collections__gqlv_property
@@ -1467,7 +1467,7 @@ type causeway_schema_metamodel_v2_DomainClassDto__service__gqlv_property {
 }
 
 type causeway_security_LoginRedirect {
-  _gqlv_meta: causeway_security_LoginRedirect__gqlv_meta
+  _meta: causeway_security_LoginRedirect__gqlv_meta
 }
 
 type causeway_security_LoginRedirect__gqlv_meta {
@@ -1493,7 +1493,7 @@ type causeway_security_LogoutMenu__logout__gqlv_action {
 }
 
 type causeway_testing_fixtures_FixtureResult {
-  _gqlv_meta: causeway_testing_fixtures_FixtureResult__gqlv_meta
+  _meta: causeway_testing_fixtures_FixtureResult__gqlv_meta
   className: causeway_testing_fixtures_FixtureResult__className__gqlv_property
   fixtureScriptClassName: causeway_testing_fixtures_FixtureResult__fixtureScriptClassName__gqlv_property
   key: causeway_testing_fixtures_FixtureResult__key__gqlv_property
@@ -1547,7 +1547,7 @@ type causeway_testing_fixtures_FixtureResult__object__gqlv_property {
 }
 
 type java_lang_Runnable {
-  _gqlv_meta: java_lang_Runnable__gqlv_meta
+  _meta: java_lang_Runnable__gqlv_meta
 }
 
 type java_lang_Runnable__gqlv_meta {
@@ -1562,7 +1562,7 @@ type java_lang_Runnable__gqlv_meta {
 }
 
 type java_util_Map {
-  _gqlv_meta: java_util_Map__gqlv_meta
+  _meta: java_util_Map__gqlv_meta
 }
 
 type java_util_Map__gqlv_meta {
@@ -1577,7 +1577,7 @@ type java_util_Map__gqlv_meta {
 }
 
 type java_util_SortedMap {
-  _gqlv_meta: java_util_SortedMap__gqlv_meta
+  _meta: java_util_SortedMap__gqlv_meta
 }
 
 type java_util_SortedMap__gqlv_meta {
@@ -1592,7 +1592,7 @@ type java_util_SortedMap__gqlv_meta {
 }
 
 type java_util_concurrent_Callable {
-  _gqlv_meta: java_util_concurrent_Callable__gqlv_meta
+  _meta: java_util_concurrent_Callable__gqlv_meta
 }
 
 type java_util_concurrent_Callable__gqlv_meta {
@@ -1607,7 +1607,7 @@ type java_util_concurrent_Callable__gqlv_meta {
 }
 
 type java_util_function_BiFunction {
-  _gqlv_meta: java_util_function_BiFunction__gqlv_meta
+  _meta: java_util_function_BiFunction__gqlv_meta
 }
 
 type java_util_function_BiFunction__gqlv_meta {
@@ -1622,7 +1622,7 @@ type java_util_function_BiFunction__gqlv_meta {
 }
 
 type java_util_function_Consumer {
-  _gqlv_meta: java_util_function_Consumer__gqlv_meta
+  _meta: java_util_function_Consumer__gqlv_meta
 }
 
 type java_util_function_Consumer__gqlv_meta {
@@ -1637,7 +1637,7 @@ type java_util_function_Consumer__gqlv_meta {
 }
 
 type java_util_function_Function {
-  _gqlv_meta: java_util_function_Function__gqlv_meta
+  _meta: java_util_function_Function__gqlv_meta
 }
 
 type java_util_function_Function__gqlv_meta {
@@ -1652,7 +1652,7 @@ type java_util_function_Function__gqlv_meta {
 }
 
 type java_util_stream_Stream {
-  _gqlv_meta: java_util_stream_Stream__gqlv_meta
+  _meta: java_util_stream_Stream__gqlv_meta
 }
 
 type java_util_stream_Stream__gqlv_meta {
@@ -1667,7 +1667,7 @@ type java_util_stream_Stream__gqlv_meta {
 }
 
 type org_apache_causeway_core_metamodel_inspect_model_MMNode {
-  _gqlv_meta: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_meta
+  _meta: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_meta
   childNodes: org_apache_causeway_core_metamodel_inspect_model_MMNode__childNodes__gqlv_collection
   parentNode: org_apache_causeway_core_metamodel_inspect_model_MMNode__parentNode__gqlv_property
 }
@@ -1698,7 +1698,7 @@ type org_apache_causeway_core_metamodel_inspect_model_MMNode__parentNode__gqlv_p
 }
 
 type org_apache_causeway_core_metamodel_inspect_model_MemberNode {
-  _gqlv_meta: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_meta
+  _meta: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_meta
   childNodes: org_apache_causeway_core_metamodel_inspect_model_MemberNode__childNodes__gqlv_collection
   mixedIn: org_apache_causeway_core_metamodel_inspect_model_MemberNode__mixedIn__gqlv_property
   parentNode: org_apache_causeway_core_metamodel_inspect_model_MemberNode__parentNode__gqlv_property
@@ -1740,7 +1740,7 @@ type org_apache_causeway_core_metamodel_inspect_model_MemberNode__parentNode__gq
 }
 
 type org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript {
-  _gqlv_meta: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_meta
+  _meta: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_meta
   friendlyName: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__friendlyName__gqlv_property
   qualifiedName: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__qualifiedName__gqlv_property
 }
@@ -2379,7 +2379,7 @@ type university_calc_Calculator__plusJodaDays__numDays__gqlv_action_parameter {
 
 "University department specializing in a field of study"
 type university_dept_Department {
-  _gqlv_meta: university_dept_Department__gqlv_meta
+  _meta: university_dept_Department__gqlv_meta
   addStaffMember: university_dept_Department__addStaffMember__gqlv_action
   addStaffMembers: university_dept_Department__addStaffMembers__gqlv_action
   changeDeptHead: university_dept_Department__changeDeptHead__gqlv_action
@@ -2601,7 +2601,7 @@ type university_dept_Departments__findDepartmentByName__name__gqlv_action_parame
 
 "Departmental head, responsible for curriculum, research, funding and staff"
 type university_dept_DeptHead {
-  _gqlv_meta: university_dept_DeptHead__gqlv_meta
+  _meta: university_dept_DeptHead__gqlv_meta
   changeDepartment: university_dept_DeptHead__changeDepartment__gqlv_action
   changeName: university_dept_DeptHead__changeName__gqlv_action
   department: university_dept_DeptHead__department__gqlv_property
@@ -2723,7 +2723,7 @@ type university_dept_Staff {
 
 "Staff member of a university department, responsible for delivering lectures, tutorials, exam invigilation and candidate interviews"
 type university_dept_StaffMember {
-  _gqlv_meta: university_dept_StaffMember__gqlv_meta
+  _meta: university_dept_StaffMember__gqlv_meta
   department: university_dept_StaffMember__department__gqlv_property
   grade: university_dept_StaffMember__grade__gqlv_property
   name: university_dept_StaffMember__name__gqlv_property
@@ -2775,7 +2775,6 @@ type university_dept_StaffMember__name__gqlv_property {
 type university_dept_StaffMember__photo__gqlv_property {
   datatype: String
   disabled: String
-  get: university_dept_StaffMember__photo__gqlv_property_blob
   hidden: Boolean
   set(photo: String): university_dept_StaffMember
   validate(photo: String): String


(causeway) 01/08: CAUSEWAY-3676: adds support for retrieving blob bytes via rest controller;

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 4e637873882b4e2523c603b649443ff751f8a000
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Feb 14 21:07:15 2024 +0000

    CAUSEWAY-3676: adds support for retrieving blob bytes via rest controller;
    
    also support for obtaining multiple references from a choices or autoComplete etc
---
 .../graphql/model/domain/GqlvAbstractCustom.java   |  4 +
 .../viewer/graphql/model/domain/GqlvAction.java    | 17 +---
 .../graphql/model/domain/GqlvAssociationGet.java   |  4 +-
 .../graphql/model/domain/GqlvMetaSaveAs.java       | 14 +++-
 .../viewer/graphql/model/domain/GqlvProperty.java  | 33 +++++---
 .../graphql/model/domain/GqlvPropertyGetBlob.java  | 90 ++++++++++++++++++++++
 ...onGet.java => GqlvPropertyGetBlobAbstract.java} | 60 +++++++--------
 ...taSaveAs.java => GqlvPropertyGetBlobBytes.java} | 38 ++++-----
 ...aveAs.java => GqlvPropertyGetBlobMimeType.java} | 30 ++------
 ...etaSaveAs.java => GqlvPropertyGetBlobName.java} | 32 ++------
 .../viewer/graphql/model/domain/TypeNames.java     |  4 +
 ...d_department_and_add_staff_member_choices._.gql | 34 ++++++++
 ...ment_and_add_staff_member_choices.approved.json | 52 +++++++++++++
 ...department_and_add_staff_members.choices._.gql} |  0
 .../queryandmutations/Department_IntegTest.java    |  9 +++
 .../Staff_IntegTest.list_all_staff_members._.gql   |  6 +-
 ..._IntegTest.list_all_staff_members.approved.json | 30 ++++++--
 viewers/graphql/test/src/test/resources/schema.gql | 28 ++++++-
 viewers/graphql/viewer/pom.xml                     |  4 +
 .../graphql/viewer/src/main/java/module-info.java  |  2 +
 .../viewer/controller/BlobBytesController.java     | 80 +++++++++++++++++++
 21 files changed, 433 insertions(+), 138 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
index 9847453041..479b7cc62e 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
@@ -59,6 +59,10 @@ public abstract class GqlvAbstractCustom extends GqlvAbstract implements Parent
         return gqlObjectType != null;
     }
 
+    protected final void addChildFieldFor(GqlvAbstract hasField) {
+        addChildField(hasField.getField());
+    }
+
     protected final void addChildField(GraphQLFieldDefinition childField) {
         if (isBuilt()) {
             return;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
index d4f037dcb7..fa8ef68e2c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
@@ -72,22 +72,13 @@ public class GqlvAction
             final Context context) {
         super(holder, objectAction, TypeNames.actionTypeNameFor(holder.getObjectSpecification(), objectAction), context);
 
-        this.hidden = new GqlvMemberHidden<>(this, context);
-        addChildField(hidden.getField());
-
-        this.disabled = new GqlvMemberDisabled<>(this, context);
-        addChildField(disabled.getField());
-
-        this.validate = new GqlvActionValidity(this, context);
-        addChildField(validate.getField());
+        addChildFieldFor(this.hidden = new GqlvMemberHidden<>(this, context));
+        addChildFieldFor(this.disabled = new GqlvMemberDisabled<>(this, context));
+        addChildFieldFor(this.validate = new GqlvActionValidity(this, context));
 
         val variant = context.causewayConfiguration.getViewer().getGraphql().getApiVariant();
         if (objectAction.getSemantics().isSafeInNature() || variant == QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT) {
-            this.invoke = new GqlvActionInvoke(this, context);
-            GraphQLFieldDefinition invokeField = this.invoke.getField();
-            if (invokeField != null) {
-                addChildField(invokeField);
-            }
+            addChildFieldFor(this.invoke = new GqlvActionInvoke(this, context));
         } else {
             this.invoke = null;
         }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java
index 2acd561b72..dbb63d0c3c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java
@@ -56,10 +56,10 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq
     abstract GraphQLOutputType outputTypeFor(Holder<T> holder);
 
     @Override
-    protected Object fetchData(final DataFetchingEnvironment dataFetchingEnvironment) {
+    protected Object fetchData(final DataFetchingEnvironment environment) {
 
         // TODO: introduce evaluator
-        val sourcePojo = BookmarkedPojo.sourceFrom(dataFetchingEnvironment);
+        val sourcePojo = BookmarkedPojo.sourceFrom(environment);
 
         val sourcePojoClass = sourcePojo.getClass();
         val objectSpecification = context.specificationLoader.loadSpecification(sourcePojoClass);
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
index 9f2e019396..62d54a1567 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
@@ -18,10 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.GraphQLContext;
 import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLArgument;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
@@ -46,7 +49,16 @@ public class GqlvMetaSaveAs extends GqlvAbstract {
     protected Object fetchData(DataFetchingEnvironment environment) {
         String ref = environment.getArgument("ref");
         GqlvMeta.Fetcher source = environment.getSource();
-        environment.getGraphQlContext().put(keyFor(ref), new BookmarkedPojo(source.bookmark(), context.bookmarkService));
+        String originalKey = keyFor(ref);
+        GraphQLContext graphQlContext = environment.getGraphQlContext();
+
+        // we ensure the key hasn't been used already
+        int i = 2; // we start at 2 deliberately, so save "cust", "cust-2", "cust-3" ... etc if there is a clash
+        String key = originalKey;
+        while (graphQlContext.hasKey(key)) {
+            key = originalKey + "-" + (i++);
+        }
+        graphQlContext.put(key, new BookmarkedPojo(source.bookmark(), context.bookmarkService));
         return ref;
     }
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
index 3cd351d1b8..7e82bd35fc 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
@@ -21,6 +21,8 @@ package org.apache.causeway.viewer.graphql.model.domain;
 import graphql.schema.GraphQLArgument;
 import graphql.schema.GraphQLFieldDefinition;
 
+import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.applib.value.Clob;
 import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
@@ -32,17 +34,18 @@ import lombok.val;
 public class GqlvProperty
         extends GqlvAssociation<OneToOneAssociation, GqlvMember.Holder>
         implements GqlvMemberHidden.Holder<OneToOneAssociation>,
-                   GqlvMemberDisabled.Holder<OneToOneAssociation>,
-                   GqlvPropertyGet.Holder,
-                   GqlvPropertyChoices.Holder,
-                   GqlvPropertyAutoComplete.Holder,
-                   GqlvPropertyValidate.Holder,
-                   GqlvPropertySet.Holder,
-                   GqlvAssociationDatatype.Holder<OneToOneAssociation> {
+        GqlvMemberDisabled.Holder<OneToOneAssociation>,
+        GqlvPropertyGet.Holder,
+        GqlvPropertyChoices.Holder,
+        GqlvPropertyAutoComplete.Holder,
+        GqlvPropertyValidate.Holder,
+        GqlvPropertySet.Holder,
+        GqlvAssociationDatatype.Holder<OneToOneAssociation>,
+        GqlvPropertyGetBlob.Holder {
 
     private final GqlvMemberHidden<OneToOneAssociation> hidden;
     private final GqlvMemberDisabled<OneToOneAssociation> disabled;
-    private final GqlvPropertyGet get;
+    private final GqlvAbstract get;
     /**
      * Populated iff there are choices
      */
@@ -71,7 +74,11 @@ public class GqlvProperty
         this.disabled = new GqlvMemberDisabled<>(this, context);
         addChildField(disabled.getField());
 
-        this.get = new GqlvPropertyGet(this, context);
+        if (isBlob()) {
+            this.get = new GqlvPropertyGetBlob(this, context);
+        } else {
+            this.get = new GqlvPropertyGet(this, context);
+        }
         addChildField(get.getField());
 
         this.validate = new GqlvPropertyValidate(this, context);
@@ -107,6 +114,14 @@ public class GqlvProperty
         buildObjectTypeAndField(oneToOneAssociation.getId());
     }
 
+    private boolean isBlob() {
+        return getOneToOneAssociation().getElementType().getCorrespondingClass() == Blob.class;
+    }
+
+    private boolean isClob() {
+        return getOneToOneAssociation().getElementType().getCorrespondingClass() == Clob.class;
+    }
+
     public void addGqlArgument(
             final OneToOneAssociation oneToOneAssociation,
             final GraphQLFieldDefinition.Builder builder,
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java
new file mode 100644
index 0000000000..bb9e3d830d
--- /dev/null
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlob.java
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.causeway.viewer.graphql.model.domain;
+
+import graphql.schema.DataFetchingEnvironment;
+
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+
+import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectAssociationProvider;
+import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+
+public class GqlvPropertyGetBlob
+        extends GqlvAbstractCustom
+        implements GqlvPropertyGetBlobBytes.Holder
+{
+
+    final Holder holder;
+    final GqlvPropertyGetBlobBytes blobName;
+    final GqlvPropertyGetBlobMimeType blobMimeType;
+    final GqlvPropertyGetBlobName blobBytes;
+
+    public GqlvPropertyGetBlob(
+            final Holder holder,
+            final Context context) {
+        super(TypeNames.propertyBlobTypeNameFor(holder.getObjectSpecification(), holder.getObjectMember()), context);
+        this.holder = holder;
+
+        addChildFieldFor(blobName = new GqlvPropertyGetBlobBytes(this, context));
+        addChildFieldFor(blobMimeType = new GqlvPropertyGetBlobMimeType(this, context));
+        addChildFieldFor(blobBytes = new GqlvPropertyGetBlobName(this, context));
+
+        setField(newFieldDefinition()
+                    .name("get")
+                    .type(buildObjectType())
+                    .build());
+    }
+
+    @Override
+    protected Object fetchData(final DataFetchingEnvironment dataFetchingEnvironment) {
+        return BookmarkedPojo.sourceFrom(dataFetchingEnvironment, context);
+    }
+
+    @Override
+    protected void addDataFetchersForChildren() {
+        blobName.addDataFetcher(this);
+        blobMimeType.addDataFetcher(this);
+        blobBytes.addDataFetcher(this);
+    }
+
+    @Override
+    public OneToOneAssociation getObjectAssociation() {
+        return holder.getObjectAssociation();
+    }
+
+    @Override
+    public OneToOneAssociation getObjectMember() {
+        return holder.getObjectMember();
+    }
+
+    @Override
+    public ObjectSpecification getObjectSpecification() {
+        return holder.getObjectSpecification();
+    }
+
+    public interface Holder
+            extends ObjectSpecificationProvider,
+                    ObjectAssociationProvider<OneToOneAssociation> {
+
+    }
+}
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
similarity index 55%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
index 2acd561b72..b2a9d79136 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationGet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
@@ -18,48 +18,39 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLOutputType;
+import java.util.Optional;
+import java.util.function.Function;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
 
+import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectAssociationProvider;
-import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+
+import graphql.schema.GraphQLFieldDefinition;
 
 import lombok.val;
 
-public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends GqlvAbstract {
+public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract {
 
-    final Holder<T> holder;
+    final Holder holder;
 
-    public GqlvAssociationGet(
-            final Holder<T> holder,
-            final Context context) {
+    public GqlvPropertyGetBlobAbstract(
+            final Holder holder,
+            final Context context, String name) {
         super(context);
         this.holder = holder;
 
-        GraphQLOutputType type = outputTypeFor(holder);
-        if (type != null) {
-            val fieldBuilder = newFieldDefinition()
-                    .name("get")
-                    .type(type);
-            setField(fieldBuilder.build());
-        } else {
-            setField(null);
-        }
+        setField(GraphQLFieldDefinition.newFieldDefinition()
+                    .name(name)
+                    .type(Scalars.GraphQLString)
+                    .build());
     }
 
-    abstract GraphQLOutputType outputTypeFor(Holder<T> holder);
-
-    @Override
-    protected Object fetchData(final DataFetchingEnvironment dataFetchingEnvironment) {
-
-        // TODO: introduce evaluator
-        val sourcePojo = BookmarkedPojo.sourceFrom(dataFetchingEnvironment);
+    protected Object fetchDataFromBlob(DataFetchingEnvironment environment, Function<Blob, ?> mapper) {
+        val sourcePojo = BookmarkedPojo.sourceFrom(environment);
 
         val sourcePojoClass = sourcePojo.getClass();
         val objectSpecification = context.specificationLoader.loadSpecification(sourcePojoClass);
@@ -72,14 +63,15 @@ public abstract class GqlvAssociationGet<T extends ObjectAssociation> extends Gq
         val managedObject = ManagedObject.adaptSingular(objectSpecification, sourcePojo);
         val resultManagedObject = association.get(managedObject);
 
-        return resultManagedObject != null
-                ? resultManagedObject.getPojo()
-                : null;
+        return Optional.ofNullable(resultManagedObject)
+                .map(ManagedObject::getPojo)
+                .filter(Blob.class::isInstance)
+                .map(Blob.class::cast)
+                .map(mapper)
+                .orElse(null);
     }
 
-    public interface Holder<T extends ObjectAssociation>
-            extends ObjectSpecificationProvider,
-                    ObjectAssociationProvider<T> {
-
+    public interface Holder extends GqlvPropertyGet.Holder {
     }
+
 }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
similarity index 55%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
index 9f2e019396..5e2246d39c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
@@ -18,40 +18,32 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLArgument;
 
-import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
+import lombok.val;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+import java.util.Optional;
 
-public class GqlvMetaSaveAs extends GqlvAbstract {
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
-    public GqlvMetaSaveAs(final Context context) {
-        super(context);
+public class GqlvPropertyGetBlobBytes extends GqlvPropertyGetBlobAbstract {
 
-        setField(newFieldDefinition()
-                    .name("saveAs")
-                    .type(Scalars.GraphQLString)
-                    .argument(new GraphQLArgument.Builder()
-                            .name("ref")
-                            .type(Scalars.GraphQLString)
-                    )
-                    .build());
+    public GqlvPropertyGetBlobBytes(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "bytes");
     }
 
     @Override
     protected Object fetchData(DataFetchingEnvironment environment) {
-        String ref = environment.getArgument("ref");
-        GqlvMeta.Fetcher source = environment.getSource();
-        environment.getGraphQlContext().put(keyFor(ref), new BookmarkedPojo(source.bookmark(), context.bookmarkService));
-        return ref;
-    }
+        val sourcePojo = BookmarkedPojo.sourceFrom(environment);
+
+        Optional<Bookmark> bookmarkIfAny = context.bookmarkService.bookmarkFor(sourcePojo);
+        return bookmarkIfAny.map(x -> String.format(
+                "///%s/object/%s:%s/%s/blobBytes", "graphql", x.getLogicalTypeName(), x.getIdentifier(), holder.getObjectAssociation().getId())).orElse(null);
 
-    public static String keyFor(String ref) {
-        return GqlvMetaSaveAs.class.getName() + "#" + ref;
     }
 
 }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobMimeType.java
similarity index 51%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobMimeType.java
index 9f2e019396..f80bdf3284 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobMimeType.java
@@ -18,40 +18,22 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLArgument;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+public class GqlvPropertyGetBlobMimeType extends GqlvPropertyGetBlobAbstract {
 
-public class GqlvMetaSaveAs extends GqlvAbstract {
+    public GqlvPropertyGetBlobMimeType(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "mimeType");
 
-    public GqlvMetaSaveAs(final Context context) {
-        super(context);
-
-        setField(newFieldDefinition()
-                    .name("saveAs")
-                    .type(Scalars.GraphQLString)
-                    .argument(new GraphQLArgument.Builder()
-                            .name("ref")
-                            .type(Scalars.GraphQLString)
-                    )
-                    .build());
     }
 
     @Override
     protected Object fetchData(DataFetchingEnvironment environment) {
-        String ref = environment.getArgument("ref");
-        GqlvMeta.Fetcher source = environment.getSource();
-        environment.getGraphQlContext().put(keyFor(ref), new BookmarkedPojo(source.bookmark(), context.bookmarkService));
-        return ref;
-    }
-
-    public static String keyFor(String ref) {
-        return GqlvMetaSaveAs.class.getName() + "#" + ref;
+        return fetchDataFromBlob(environment, blob -> blob.getMimeType().toString());
     }
 
 }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobName.java
similarity index 51%
copy from viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
copy to viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobName.java
index 9f2e019396..63180d7c17 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobName.java
@@ -18,40 +18,22 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLArgument;
 
+import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+public class GqlvPropertyGetBlobName extends GqlvPropertyGetBlobAbstract {
 
-public class GqlvMetaSaveAs extends GqlvAbstract {
-
-    public GqlvMetaSaveAs(final Context context) {
-        super(context);
-
-        setField(newFieldDefinition()
-                    .name("saveAs")
-                    .type(Scalars.GraphQLString)
-                    .argument(new GraphQLArgument.Builder()
-                            .name("ref")
-                            .type(Scalars.GraphQLString)
-                    )
-                    .build());
+    public GqlvPropertyGetBlobName(
+            final Holder holder,
+            final Context context) {
+        super(holder, context, "name");
     }
 
     @Override
     protected Object fetchData(DataFetchingEnvironment environment) {
-        String ref = environment.getArgument("ref");
-        GqlvMeta.Fetcher source = environment.getSource();
-        environment.getGraphQlContext().put(keyFor(ref), new BookmarkedPojo(source.bookmark(), context.bookmarkService));
-        return ref;
-    }
-
-    public static String keyFor(String ref) {
-        return GqlvMetaSaveAs.class.getName() + "#" + ref;
+        return fetchDataFromBlob(environment, Blob::getName);
     }
 
 }
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/TypeNames.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/TypeNames.java
index ca90a3f5b2..abe4d837f0 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/TypeNames.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/TypeNames.java
@@ -61,6 +61,10 @@ public final class TypeNames {
         return objectTypeNameFor(owningType) + "__" + oneToOneAssociation.getId() + "__gqlv_property";
     }
 
+    public static String propertyBlobTypeNameFor(ObjectSpecification owningType, OneToOneAssociation oneToOneAssociation) {
+        return objectTypeNameFor(owningType) + "__" + oneToOneAssociation.getId() + "__gqlv_property_blob";
+    }
+
     public static String collectionTypeNameFor(ObjectSpecification owningType, OneToManyAssociation objectMember) {
         return objectTypeNameFor(owningType) + "__" + objectMember.getId() + "__gqlv_collection";
     }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql
new file mode 100644
index 0000000000..3f8207e675
--- /dev/null
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql
@@ -0,0 +1,34 @@
+{
+  Scenario(name: "checks choice 'saveAs' reference numbering") {
+    Given {
+      university_dept_Departments {
+        findDepartmentByName {
+          invoke(name: "Classics") {
+            addStaffMembers {
+              params {
+                staffMembers {
+                  choices {
+                    _gqlv_meta {
+                      id
+                      saveAs(ref: "staff-member-choices")
+                    }
+                    name {
+                      get
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    Then {
+      university_dept_StaffMember(object: {ref: "staff-member-choices-2"}) {
+        name {
+          get
+        }
+      }
+    }
+  }
+}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json
new file mode 100644
index 0000000000..5d9cf1af12
--- /dev/null
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json
@@ -0,0 +1,52 @@
+{
+  "data" : {
+    "Scenario" : {
+      "Given" : {
+        "university_dept_Departments" : {
+          "findDepartmentByName" : {
+            "invoke" : {
+              "addStaffMembers" : {
+                "params" : {
+                  "staffMembers" : {
+                    "choices" : [ {
+                      "_gqlv_meta" : {
+                        "id" : "15",
+                        "saveAs" : "staff-member-choices"
+                      },
+                      "name" : {
+                        "get" : "John Gartner"
+                      }
+                    }, {
+                      "_gqlv_meta" : {
+                        "id" : "16",
+                        "saveAs" : "staff-member-choices"
+                      },
+                      "name" : {
+                        "get" : "Margaret Randall"
+                      }
+                    }, {
+                      "_gqlv_meta" : {
+                        "id" : "14",
+                        "saveAs" : "staff-member-choices"
+                      },
+                      "name" : {
+                        "get" : "Mervin Hughes"
+                      }
+                    } ]
+                  }
+                }
+              }
+            }
+          }
+        }
+      },
+      "Then" : {
+        "university_dept_StaffMember" : {
+          "name" : {
+            "get" : "Margaret Randall"
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.choices.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.choices._.gql
similarity index 100%
rename from viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.choices.gql
rename to viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.choices._.gql
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
index 44778f12b7..5db64cac19 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
@@ -113,6 +113,15 @@ public class Department_IntegTest extends Abstract_IntegTest {
         Approvals.verify(submit(), jsonOptions());
     }
 
+    @Test
+    @UseReporter(DiffReporter.class)
+    void find_department_and_add_staff_member_choices() throws Exception {
+
+        // when, then
+        Approvals.verify(submit(), jsonOptions());
+
+    }
+
     @Test
     @UseReporter(DiffReporter.class)
     void find_department_and_add_staff_members() throws Exception {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members._.gql
index f4b574714d..5d3c3da6c5 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members._.gql
@@ -9,7 +9,11 @@
           get
         }
         photo {
-          get
+          get {
+            name
+            mimeType
+            bytes
+          }
         }
       }
     }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
index a78da165d1..58c2e97788 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
@@ -10,7 +10,11 @@
             "get" : "LECTURER"
           },
           "photo" : {
-            "get" : "StaffMember-photo-Bar.pdf [application/pdf]: 47488 bytes"
+            "get" : {
+              "name" : "StaffMember-photo-Bar.pdf",
+              "mimeType" : "application/pdf",
+              "bytes" : "///graphql/object/university.dept.StaffMember:658/photo/blobBytes"
+            }
           }
         }, {
           "name" : {
@@ -20,7 +24,11 @@
             "get" : "LECTURER"
           },
           "photo" : {
-            "get" : null
+            "get" : {
+              "name" : null,
+              "mimeType" : null,
+              "bytes" : "///graphql/object/university.dept.StaffMember:660/photo/blobBytes"
+            }
           }
         }, {
           "name" : {
@@ -30,7 +38,11 @@
             "get" : "LECTURER"
           },
           "photo" : {
-            "get" : "StaffMember-photo-Foo.pdf [application/pdf]: 47185 bytes"
+            "get" : {
+              "name" : "StaffMember-photo-Foo.pdf",
+              "mimeType" : "application/pdf",
+              "bytes" : "///graphql/object/university.dept.StaffMember:657/photo/blobBytes"
+            }
           }
         }, {
           "name" : {
@@ -40,7 +52,11 @@
             "get" : "LECTURER"
           },
           "photo" : {
-            "get" : null
+            "get" : {
+              "name" : null,
+              "mimeType" : null,
+              "bytes" : "///graphql/object/university.dept.StaffMember:661/photo/blobBytes"
+            }
           }
         }, {
           "name" : {
@@ -50,7 +66,11 @@
             "get" : "LECTURER"
           },
           "photo" : {
-            "get" : "StaffMember-photo-Fizz.pdf [application/pdf]: 46833 bytes"
+            "get" : {
+              "name" : "StaffMember-photo-Fizz.pdf",
+              "mimeType" : "application/pdf",
+              "bytes" : "///graphql/object/university.dept.StaffMember:659/photo/blobBytes"
+            }
           }
         } ]
       }
diff --git a/viewers/graphql/test/src/test/resources/schema.gql b/viewers/graphql/test/src/test/resources/schema.gql
index 5a059d85a2..4aca251bf4 100644
--- a/viewers/graphql/test/src/test/resources/schema.gql
+++ b/viewers/graphql/test/src/test/resources/schema.gql
@@ -228,6 +228,7 @@ type causeway_applib_DomainObjectList__gqlv_meta {
 }
 
 type causeway_applib_DomainObjectList__objects__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -249,6 +250,7 @@ type causeway_applib_FacetGroupNode {
 }
 
 type causeway_applib_FacetGroupNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -289,6 +291,7 @@ type causeway_applib_ParameterNode {
 }
 
 type causeway_applib_ParameterNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -331,6 +334,7 @@ type causeway_applib_PropertyNode {
 }
 
 type causeway_applib_PropertyNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -416,6 +420,7 @@ type causeway_applib_TypeNode {
 }
 
 type causeway_applib_TypeNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -557,6 +562,7 @@ type causeway_applib_UserMemento__realName__gqlv_property {
 }
 
 type causeway_applib_UserMemento__roles__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_applib_RoleMemento]
   hidden: Boolean
@@ -601,6 +607,7 @@ type causeway_applib_node_ActionNode__action__gqlv_property {
 }
 
 type causeway_applib_node_ActionNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -643,6 +650,7 @@ type causeway_applib_node_CollectionNode {
 }
 
 type causeway_applib_node_CollectionNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -693,6 +701,7 @@ type causeway_applib_node_FacetAttrNode {
 }
 
 type causeway_applib_node_FacetAttrNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -735,6 +744,7 @@ type causeway_applib_node_FacetNode {
 }
 
 type causeway_applib_node_FacetNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -830,6 +840,7 @@ type causeway_conf_ConfigurationViewmodel {
 }
 
 type causeway_conf_ConfigurationViewmodel__environment__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_conf_ConfigurationProperty]
   hidden: Boolean
@@ -847,12 +858,14 @@ type causeway_conf_ConfigurationViewmodel__gqlv_meta {
 }
 
 type causeway_conf_ConfigurationViewmodel__primary__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_conf_ConfigurationProperty]
   hidden: Boolean
 }
 
 type causeway_conf_ConfigurationViewmodel__secondary__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_conf_ConfigurationProperty]
   hidden: Boolean
@@ -922,6 +935,7 @@ type causeway_feat_ApplicationNamespace {
 }
 
 type causeway_feat_ApplicationNamespace__contents__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -1281,12 +1295,14 @@ type causeway_feat_ApplicationTypeProperty__typicalLength__gqlv_property {
 }
 
 type causeway_feat_ApplicationType__actions__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_feat_ApplicationTypeAction]
   hidden: Boolean
 }
 
 type causeway_feat_ApplicationType__collections__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_feat_ApplicationTypeCollection]
   hidden: Boolean
@@ -1330,6 +1346,7 @@ type causeway_feat_ApplicationType__parent__gqlv_property {
 }
 
 type causeway_feat_ApplicationType__properties__gqlv_collection {
+  datatype: String
   disabled: String
   get: [causeway_feat_ApplicationTypeProperty]
   hidden: Boolean
@@ -1656,6 +1673,7 @@ type org_apache_causeway_core_metamodel_inspect_model_MMNode {
 }
 
 type org_apache_causeway_core_metamodel_inspect_model_MMNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -1687,6 +1705,7 @@ type org_apache_causeway_core_metamodel_inspect_model_MemberNode {
 }
 
 type org_apache_causeway_core_metamodel_inspect_model_MemberNode__childNodes__gqlv_collection {
+  datatype: String
   disabled: String
   hidden: Boolean
 }
@@ -2511,6 +2530,7 @@ type university_dept_Department__removeStaffMember__staffMember__gqlv_action_par
 
 "Staff member of a university department, responsible for delivering lectures, tutorials, exam invigilation and candidate interviews"
 type university_dept_Department__staffMembers__gqlv_collection {
+  datatype: String
   disabled: String
   get: [university_dept_StaffMember]
   hidden: Boolean
@@ -2755,12 +2775,18 @@ type university_dept_StaffMember__name__gqlv_property {
 type university_dept_StaffMember__photo__gqlv_property {
   datatype: String
   disabled: String
-  get: String
+  get: university_dept_StaffMember__photo__gqlv_property_blob
   hidden: Boolean
   set(photo: String): university_dept_StaffMember
   validate(photo: String): String
 }
 
+type university_dept_StaffMember__photo__gqlv_property_blob {
+  bytes: String
+  mimeType: String
+  name: String
+}
+
 type university_dept_Staff__createStaffMember__department__gqlv_action_parameter {
   choices(name: String): [university_dept_Department]
   datatype: String
diff --git a/viewers/graphql/viewer/pom.xml b/viewers/graphql/viewer/pom.xml
index f83bdf9a1c..50ffa9b7e9 100644
--- a/viewers/graphql/viewer/pom.xml
+++ b/viewers/graphql/viewer/pom.xml
@@ -47,6 +47,10 @@
 	</build>
 	<dependencies>
 
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot</artifactId>
+        </dependency>
 		<dependency>
 			<groupId>org.apache.causeway.viewer</groupId>
 			<artifactId>causeway-viewer-graphql-model</artifactId>
diff --git a/viewers/graphql/viewer/src/main/java/module-info.java b/viewers/graphql/viewer/src/main/java/module-info.java
index d1d8a7bb90..4a9a36c67a 100644
--- a/viewers/graphql/viewer/src/main/java/module-info.java
+++ b/viewers/graphql/viewer/src/main/java/module-info.java
@@ -1,6 +1,7 @@
 module org.apache.causeway.incubator.viewer.graphql.viewer {
     exports org.apache.causeway.viewer.graphql.viewer;
     exports org.apache.causeway.viewer.graphql.viewer.integration;
+    exports org.apache.causeway.viewer.graphql.viewer.controller;
 
     requires com.fasterxml.jackson.core;
     requires com.fasterxml.jackson.databind;
@@ -25,4 +26,5 @@ module org.apache.causeway.incubator.viewer.graphql.viewer {
     requires spring.graphql;
     requires spring.tx;
     requires org.apache.causeway.incubator.viewer.graphql.applib;
+    requires spring.web;
 }
\ No newline at end of file
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
new file mode 100644
index 0000000000..fc5ae3e523
--- /dev/null
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
@@ -0,0 +1,80 @@
+package org.apache.causeway.viewer.graphql.viewer.controller;
+
+import javax.inject.Inject;
+
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
+
+import org.springframework.http.ContentDisposition;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.applib.services.bookmark.BookmarkService;
+import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.core.metamodel.object.ManagedObject;
+import org.apache.causeway.core.metamodel.objectmanager.ObjectManager;
+
+import lombok.RequiredArgsConstructor;
+import lombok.Value;
+
+import java.util.Optional;
+
+@RestController(value = "/graphql/object")
+@RequiredArgsConstructor(onConstructor_ = {@Inject})
+public class BlobBytesController {
+
+    private final BookmarkService bookmarkService;
+    private final ObjectManager objectManager;
+
+    @Value(staticConstructor = "of")
+    private static class ManagedObjectAndPropertyIfAny {
+        ManagedObject owningObject;
+        Optional<OneToOneAssociation> propertyIfAny;
+        boolean isPropertyPresent() {
+            return propertyIfAny.isPresent();
+        }
+    }
+
+    private static class ManagedObjectAndProperty {
+        private static ManagedObjectAndProperty of(ManagedObjectAndPropertyIfAny tuple) {
+            return new ManagedObjectAndProperty(tuple);
+        }
+        private ManagedObjectAndProperty(ManagedObjectAndPropertyIfAny tuple) {
+            this.owningObject = tuple.owningObject;
+            this.property = tuple.propertyIfAny.orElse(null);
+        }
+        ManagedObject owningObject;
+        OneToOneAssociation property;
+
+        public ManagedObject value() {
+            return property.get(owningObject);
+        }
+    }
+
+    @GetMapping(value = "/{logicalTypeName}:{id}/{propertyId}/blobBytes")
+    public ResponseEntity<byte[]> propertyBlobBytes(
+            @PathVariable final String logicalTypeName,
+            @PathVariable final String id,
+            @PathVariable final String propertyId) {
+
+        return bookmarkService.lookup(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, id))
+                .map(objectManager::adapt)
+                .map(managedObject -> ManagedObjectAndPropertyIfAny.of(managedObject, managedObject.getSpecification().getProperty(propertyId)))
+                .filter(ManagedObjectAndPropertyIfAny::isPropertyPresent)
+                .map(ManagedObjectAndProperty::of)
+                .map(ManagedObjectAndProperty::value)
+                .map(ManagedObject::getPojo)
+                .filter(Blob.class::isInstance)
+                .map(Blob.class::cast)
+                .map(blob -> ResponseEntity.ok()
+                        .contentType(MediaType.APPLICATION_PDF)
+                        .header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(blob.getName()).build().toString())
+                        .contentLength(blob.getBytes().length)
+                        .body(blob.getBytes()))
+                .orElse(ResponseEntity.notFound().build());
+    }
+}


(causeway) 08/08: CAUSEWAY-3676: experiment if can add multiple fields of different types; seemingly not.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 61dbe87fef15a9f2fc69e7b3c3b998ac24a1a82b
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Feb 16 18:07:36 2024 +0000

    CAUSEWAY-3676: experiment if can add multiple fields of different types; seemingly not.
---
 .../graphql/model/domain/GqlvDomainObject.java     |   2 +
 viewers/graphql/test/src/test/resources/schema.gql | 149 +++++++++++----------
 2 files changed, 77 insertions(+), 74 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
index a86b93ea5a..2b0726d254 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
@@ -39,6 +39,8 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
+import graphql.schema.GraphQLList;
+
 import lombok.Getter;
 import lombok.val;
 
diff --git a/viewers/graphql/test/src/test/resources/schema.gql b/viewers/graphql/test/src/test/resources/schema.gql
index 2c63dfb7fe..8c377660d5 100644
--- a/viewers/graphql/test/src/test/resources/schema.gql
+++ b/viewers/graphql/test/src/test/resources/schema.gql
@@ -68,51 +68,51 @@ type Mutation {
 
 type Query {
   Scenario(name: String): Scenario
-  causeway_applib_DomainObjectList(object: causeway_applib_DomainObjectList__gqlv_input): causeway_applib_DomainObjectList
-  causeway_applib_FacetGroupNode(object: causeway_applib_FacetGroupNode__gqlv_input): causeway_applib_FacetGroupNode
-  causeway_applib_ParameterNode(object: causeway_applib_ParameterNode__gqlv_input): causeway_applib_ParameterNode
-  causeway_applib_PropertyNode(object: causeway_applib_PropertyNode__gqlv_input): causeway_applib_PropertyNode
-  causeway_applib_RoleMemento(object: causeway_applib_RoleMemento__gqlv_input): causeway_applib_RoleMemento
-  causeway_applib_TypeNode(object: causeway_applib_TypeNode__gqlv_input): causeway_applib_TypeNode
-  causeway_applib_UserMemento(object: causeway_applib_UserMemento__gqlv_input): causeway_applib_UserMemento
+  causeway_applib_DomainObjectList(object: causeway_applib_DomainObjectList__gqlv_input): [causeway_applib_DomainObjectList]
+  causeway_applib_FacetGroupNode(object: causeway_applib_FacetGroupNode__gqlv_input): [causeway_applib_FacetGroupNode]
+  causeway_applib_ParameterNode(object: causeway_applib_ParameterNode__gqlv_input): [causeway_applib_ParameterNode]
+  causeway_applib_PropertyNode(object: causeway_applib_PropertyNode__gqlv_input): [causeway_applib_PropertyNode]
+  causeway_applib_RoleMemento(object: causeway_applib_RoleMemento__gqlv_input): [causeway_applib_RoleMemento]
+  causeway_applib_TypeNode(object: causeway_applib_TypeNode__gqlv_input): [causeway_applib_TypeNode]
+  causeway_applib_UserMemento(object: causeway_applib_UserMemento__gqlv_input): [causeway_applib_UserMemento]
   causeway_applib_UserMenu: causeway_applib_UserMenu
-  causeway_applib_node_ActionNode(object: causeway_applib_node_ActionNode__gqlv_input): causeway_applib_node_ActionNode
-  causeway_applib_node_CollectionNode(object: causeway_applib_node_CollectionNode__gqlv_input): causeway_applib_node_CollectionNode
-  causeway_applib_node_FacetAttrNode(object: causeway_applib_node_FacetAttrNode__gqlv_input): causeway_applib_node_FacetAttrNode
-  causeway_applib_node_FacetNode(object: causeway_applib_node_FacetNode__gqlv_input): causeway_applib_node_FacetNode
+  causeway_applib_node_ActionNode(object: causeway_applib_node_ActionNode__gqlv_input): [causeway_applib_node_ActionNode]
+  causeway_applib_node_CollectionNode(object: causeway_applib_node_CollectionNode__gqlv_input): [causeway_applib_node_CollectionNode]
+  causeway_applib_node_FacetAttrNode(object: causeway_applib_node_FacetAttrNode__gqlv_input): [causeway_applib_node_FacetAttrNode]
+  causeway_applib_node_FacetNode(object: causeway_applib_node_FacetNode__gqlv_input): [causeway_applib_node_FacetNode]
   causeway_conf_ConfigurationMenu: causeway_conf_ConfigurationMenu
-  causeway_conf_ConfigurationProperty(object: causeway_conf_ConfigurationProperty__gqlv_input): causeway_conf_ConfigurationProperty
-  causeway_conf_ConfigurationViewmodel(object: causeway_conf_ConfigurationViewmodel__gqlv_input): causeway_conf_ConfigurationViewmodel
-  causeway_feat_ApplicationFeatureViewModel(object: causeway_feat_ApplicationFeatureViewModel__gqlv_input): causeway_feat_ApplicationFeatureViewModel
-  causeway_feat_ApplicationNamespace(object: causeway_feat_ApplicationNamespace__gqlv_input): causeway_feat_ApplicationNamespace
-  causeway_feat_ApplicationType(object: causeway_feat_ApplicationType__gqlv_input): causeway_feat_ApplicationType
-  causeway_feat_ApplicationTypeAction(object: causeway_feat_ApplicationTypeAction__gqlv_input): causeway_feat_ApplicationTypeAction
-  causeway_feat_ApplicationTypeCollection(object: causeway_feat_ApplicationTypeCollection__gqlv_input): causeway_feat_ApplicationTypeCollection
-  causeway_feat_ApplicationTypeMember(object: causeway_feat_ApplicationTypeMember__gqlv_input): causeway_feat_ApplicationTypeMember
-  causeway_feat_ApplicationTypeProperty(object: causeway_feat_ApplicationTypeProperty__gqlv_input): causeway_feat_ApplicationTypeProperty
-  causeway_schema_metamodel_v2_DomainClassDto(object: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_security_LoginRedirect(object: causeway_security_LoginRedirect__gqlv_input): causeway_security_LoginRedirect
+  causeway_conf_ConfigurationProperty(object: causeway_conf_ConfigurationProperty__gqlv_input): [causeway_conf_ConfigurationProperty]
+  causeway_conf_ConfigurationViewmodel(object: causeway_conf_ConfigurationViewmodel__gqlv_input): [causeway_conf_ConfigurationViewmodel]
+  causeway_feat_ApplicationFeatureViewModel(object: causeway_feat_ApplicationFeatureViewModel__gqlv_input): [causeway_feat_ApplicationFeatureViewModel]
+  causeway_feat_ApplicationNamespace(object: causeway_feat_ApplicationNamespace__gqlv_input): [causeway_feat_ApplicationNamespace]
+  causeway_feat_ApplicationType(object: causeway_feat_ApplicationType__gqlv_input): [causeway_feat_ApplicationType]
+  causeway_feat_ApplicationTypeAction(object: causeway_feat_ApplicationTypeAction__gqlv_input): [causeway_feat_ApplicationTypeAction]
+  causeway_feat_ApplicationTypeCollection(object: causeway_feat_ApplicationTypeCollection__gqlv_input): [causeway_feat_ApplicationTypeCollection]
+  causeway_feat_ApplicationTypeMember(object: causeway_feat_ApplicationTypeMember__gqlv_input): [causeway_feat_ApplicationTypeMember]
+  causeway_feat_ApplicationTypeProperty(object: causeway_feat_ApplicationTypeProperty__gqlv_input): [causeway_feat_ApplicationTypeProperty]
+  causeway_schema_metamodel_v2_DomainClassDto(object: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input): [causeway_schema_metamodel_v2_DomainClassDto]
+  causeway_security_LoginRedirect(object: causeway_security_LoginRedirect__gqlv_input): [causeway_security_LoginRedirect]
   causeway_security_LogoutMenu: causeway_security_LogoutMenu
-  causeway_testing_fixtures_FixtureResult(object: causeway_testing_fixtures_FixtureResult__gqlv_input): causeway_testing_fixtures_FixtureResult
-  java_lang_Runnable(object: java_lang_Runnable__gqlv_input): java_lang_Runnable
-  java_util_Map(object: java_util_Map__gqlv_input): java_util_Map
-  java_util_SortedMap(object: java_util_SortedMap__gqlv_input): java_util_SortedMap
-  java_util_concurrent_Callable(object: java_util_concurrent_Callable__gqlv_input): java_util_concurrent_Callable
-  java_util_function_BiFunction(object: java_util_function_BiFunction__gqlv_input): java_util_function_BiFunction
-  java_util_function_Consumer(object: java_util_function_Consumer__gqlv_input): java_util_function_Consumer
-  java_util_function_Function(object: java_util_function_Function__gqlv_input): java_util_function_Function
-  java_util_stream_Stream(object: java_util_stream_Stream__gqlv_input): java_util_stream_Stream
-  org_apache_causeway_core_metamodel_inspect_model_MMNode(object: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_input): org_apache_causeway_core_metamodel_inspect_model_MMNode
-  org_apache_causeway_core_metamodel_inspect_model_MemberNode(object: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input): org_apache_causeway_core_metamodel_inspect_model_MemberNode
-  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript(object: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input): org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript
+  causeway_testing_fixtures_FixtureResult(object: causeway_testing_fixtures_FixtureResult__gqlv_input): [causeway_testing_fixtures_FixtureResult]
+  java_lang_Runnable(object: java_lang_Runnable__gqlv_input): [java_lang_Runnable]
+  java_util_Map(object: java_util_Map__gqlv_input): [java_util_Map]
+  java_util_SortedMap(object: java_util_SortedMap__gqlv_input): [java_util_SortedMap]
+  java_util_concurrent_Callable(object: java_util_concurrent_Callable__gqlv_input): [java_util_concurrent_Callable]
+  java_util_function_BiFunction(object: java_util_function_BiFunction__gqlv_input): [java_util_function_BiFunction]
+  java_util_function_Consumer(object: java_util_function_Consumer__gqlv_input): [java_util_function_Consumer]
+  java_util_function_Function(object: java_util_function_Function__gqlv_input): [java_util_function_Function]
+  java_util_stream_Stream(object: java_util_stream_Stream__gqlv_input): [java_util_stream_Stream]
+  org_apache_causeway_core_metamodel_inspect_model_MMNode(object: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_input): [org_apache_causeway_core_metamodel_inspect_model_MMNode]
+  org_apache_causeway_core_metamodel_inspect_model_MemberNode(object: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input): [org_apache_causeway_core_metamodel_inspect_model_MemberNode]
+  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript(object: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input): [org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript]
   university_admin_AdminMenu: university_admin_AdminMenu
   university_calc_Calculator: university_calc_Calculator
-  university_dept_Department(object: university_dept_Department__gqlv_input): university_dept_Department
+  university_dept_Department(object: university_dept_Department__gqlv_input): [university_dept_Department]
   university_dept_Departments: university_dept_Departments
-  university_dept_DeptHead(object: university_dept_DeptHead__gqlv_input): university_dept_DeptHead
+  university_dept_DeptHead(object: university_dept_DeptHead__gqlv_input): [university_dept_DeptHead]
   university_dept_DeptHeads: university_dept_DeptHeads
   university_dept_Staff: university_dept_Staff
-  university_dept_StaffMember(object: university_dept_StaffMember__gqlv_input): university_dept_StaffMember
+  university_dept_StaffMember(object: university_dept_StaffMember__gqlv_input): [university_dept_StaffMember]
 }
 
 type Scenario {
@@ -123,51 +123,51 @@ type Scenario {
 }
 
 type ScenarioStep {
-  causeway_applib_DomainObjectList(object: causeway_applib_DomainObjectList__gqlv_input): causeway_applib_DomainObjectList
-  causeway_applib_FacetGroupNode(object: causeway_applib_FacetGroupNode__gqlv_input): causeway_applib_FacetGroupNode
-  causeway_applib_ParameterNode(object: causeway_applib_ParameterNode__gqlv_input): causeway_applib_ParameterNode
-  causeway_applib_PropertyNode(object: causeway_applib_PropertyNode__gqlv_input): causeway_applib_PropertyNode
-  causeway_applib_RoleMemento(object: causeway_applib_RoleMemento__gqlv_input): causeway_applib_RoleMemento
-  causeway_applib_TypeNode(object: causeway_applib_TypeNode__gqlv_input): causeway_applib_TypeNode
-  causeway_applib_UserMemento(object: causeway_applib_UserMemento__gqlv_input): causeway_applib_UserMemento
+  causeway_applib_DomainObjectList(object: causeway_applib_DomainObjectList__gqlv_input): [causeway_applib_DomainObjectList]
+  causeway_applib_FacetGroupNode(object: causeway_applib_FacetGroupNode__gqlv_input): [causeway_applib_FacetGroupNode]
+  causeway_applib_ParameterNode(object: causeway_applib_ParameterNode__gqlv_input): [causeway_applib_ParameterNode]
+  causeway_applib_PropertyNode(object: causeway_applib_PropertyNode__gqlv_input): [causeway_applib_PropertyNode]
+  causeway_applib_RoleMemento(object: causeway_applib_RoleMemento__gqlv_input): [causeway_applib_RoleMemento]
+  causeway_applib_TypeNode(object: causeway_applib_TypeNode__gqlv_input): [causeway_applib_TypeNode]
+  causeway_applib_UserMemento(object: causeway_applib_UserMemento__gqlv_input): [causeway_applib_UserMemento]
   causeway_applib_UserMenu: causeway_applib_UserMenu
-  causeway_applib_node_ActionNode(object: causeway_applib_node_ActionNode__gqlv_input): causeway_applib_node_ActionNode
-  causeway_applib_node_CollectionNode(object: causeway_applib_node_CollectionNode__gqlv_input): causeway_applib_node_CollectionNode
-  causeway_applib_node_FacetAttrNode(object: causeway_applib_node_FacetAttrNode__gqlv_input): causeway_applib_node_FacetAttrNode
-  causeway_applib_node_FacetNode(object: causeway_applib_node_FacetNode__gqlv_input): causeway_applib_node_FacetNode
+  causeway_applib_node_ActionNode(object: causeway_applib_node_ActionNode__gqlv_input): [causeway_applib_node_ActionNode]
+  causeway_applib_node_CollectionNode(object: causeway_applib_node_CollectionNode__gqlv_input): [causeway_applib_node_CollectionNode]
+  causeway_applib_node_FacetAttrNode(object: causeway_applib_node_FacetAttrNode__gqlv_input): [causeway_applib_node_FacetAttrNode]
+  causeway_applib_node_FacetNode(object: causeway_applib_node_FacetNode__gqlv_input): [causeway_applib_node_FacetNode]
   causeway_conf_ConfigurationMenu: causeway_conf_ConfigurationMenu
-  causeway_conf_ConfigurationProperty(object: causeway_conf_ConfigurationProperty__gqlv_input): causeway_conf_ConfigurationProperty
-  causeway_conf_ConfigurationViewmodel(object: causeway_conf_ConfigurationViewmodel__gqlv_input): causeway_conf_ConfigurationViewmodel
-  causeway_feat_ApplicationFeatureViewModel(object: causeway_feat_ApplicationFeatureViewModel__gqlv_input): causeway_feat_ApplicationFeatureViewModel
-  causeway_feat_ApplicationNamespace(object: causeway_feat_ApplicationNamespace__gqlv_input): causeway_feat_ApplicationNamespace
-  causeway_feat_ApplicationType(object: causeway_feat_ApplicationType__gqlv_input): causeway_feat_ApplicationType
-  causeway_feat_ApplicationTypeAction(object: causeway_feat_ApplicationTypeAction__gqlv_input): causeway_feat_ApplicationTypeAction
-  causeway_feat_ApplicationTypeCollection(object: causeway_feat_ApplicationTypeCollection__gqlv_input): causeway_feat_ApplicationTypeCollection
-  causeway_feat_ApplicationTypeMember(object: causeway_feat_ApplicationTypeMember__gqlv_input): causeway_feat_ApplicationTypeMember
-  causeway_feat_ApplicationTypeProperty(object: causeway_feat_ApplicationTypeProperty__gqlv_input): causeway_feat_ApplicationTypeProperty
-  causeway_schema_metamodel_v2_DomainClassDto(object: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input): causeway_schema_metamodel_v2_DomainClassDto
-  causeway_security_LoginRedirect(object: causeway_security_LoginRedirect__gqlv_input): causeway_security_LoginRedirect
+  causeway_conf_ConfigurationProperty(object: causeway_conf_ConfigurationProperty__gqlv_input): [causeway_conf_ConfigurationProperty]
+  causeway_conf_ConfigurationViewmodel(object: causeway_conf_ConfigurationViewmodel__gqlv_input): [causeway_conf_ConfigurationViewmodel]
+  causeway_feat_ApplicationFeatureViewModel(object: causeway_feat_ApplicationFeatureViewModel__gqlv_input): [causeway_feat_ApplicationFeatureViewModel]
+  causeway_feat_ApplicationNamespace(object: causeway_feat_ApplicationNamespace__gqlv_input): [causeway_feat_ApplicationNamespace]
+  causeway_feat_ApplicationType(object: causeway_feat_ApplicationType__gqlv_input): [causeway_feat_ApplicationType]
+  causeway_feat_ApplicationTypeAction(object: causeway_feat_ApplicationTypeAction__gqlv_input): [causeway_feat_ApplicationTypeAction]
+  causeway_feat_ApplicationTypeCollection(object: causeway_feat_ApplicationTypeCollection__gqlv_input): [causeway_feat_ApplicationTypeCollection]
+  causeway_feat_ApplicationTypeMember(object: causeway_feat_ApplicationTypeMember__gqlv_input): [causeway_feat_ApplicationTypeMember]
+  causeway_feat_ApplicationTypeProperty(object: causeway_feat_ApplicationTypeProperty__gqlv_input): [causeway_feat_ApplicationTypeProperty]
+  causeway_schema_metamodel_v2_DomainClassDto(object: causeway_schema_metamodel_v2_DomainClassDto__gqlv_input): [causeway_schema_metamodel_v2_DomainClassDto]
+  causeway_security_LoginRedirect(object: causeway_security_LoginRedirect__gqlv_input): [causeway_security_LoginRedirect]
   causeway_security_LogoutMenu: causeway_security_LogoutMenu
-  causeway_testing_fixtures_FixtureResult(object: causeway_testing_fixtures_FixtureResult__gqlv_input): causeway_testing_fixtures_FixtureResult
-  java_lang_Runnable(object: java_lang_Runnable__gqlv_input): java_lang_Runnable
-  java_util_Map(object: java_util_Map__gqlv_input): java_util_Map
-  java_util_SortedMap(object: java_util_SortedMap__gqlv_input): java_util_SortedMap
-  java_util_concurrent_Callable(object: java_util_concurrent_Callable__gqlv_input): java_util_concurrent_Callable
-  java_util_function_BiFunction(object: java_util_function_BiFunction__gqlv_input): java_util_function_BiFunction
-  java_util_function_Consumer(object: java_util_function_Consumer__gqlv_input): java_util_function_Consumer
-  java_util_function_Function(object: java_util_function_Function__gqlv_input): java_util_function_Function
-  java_util_stream_Stream(object: java_util_stream_Stream__gqlv_input): java_util_stream_Stream
-  org_apache_causeway_core_metamodel_inspect_model_MMNode(object: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_input): org_apache_causeway_core_metamodel_inspect_model_MMNode
-  org_apache_causeway_core_metamodel_inspect_model_MemberNode(object: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input): org_apache_causeway_core_metamodel_inspect_model_MemberNode
-  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript(object: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input): org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript
+  causeway_testing_fixtures_FixtureResult(object: causeway_testing_fixtures_FixtureResult__gqlv_input): [causeway_testing_fixtures_FixtureResult]
+  java_lang_Runnable(object: java_lang_Runnable__gqlv_input): [java_lang_Runnable]
+  java_util_Map(object: java_util_Map__gqlv_input): [java_util_Map]
+  java_util_SortedMap(object: java_util_SortedMap__gqlv_input): [java_util_SortedMap]
+  java_util_concurrent_Callable(object: java_util_concurrent_Callable__gqlv_input): [java_util_concurrent_Callable]
+  java_util_function_BiFunction(object: java_util_function_BiFunction__gqlv_input): [java_util_function_BiFunction]
+  java_util_function_Consumer(object: java_util_function_Consumer__gqlv_input): [java_util_function_Consumer]
+  java_util_function_Function(object: java_util_function_Function__gqlv_input): [java_util_function_Function]
+  java_util_stream_Stream(object: java_util_stream_Stream__gqlv_input): [java_util_stream_Stream]
+  org_apache_causeway_core_metamodel_inspect_model_MMNode(object: org_apache_causeway_core_metamodel_inspect_model_MMNode__gqlv_input): [org_apache_causeway_core_metamodel_inspect_model_MMNode]
+  org_apache_causeway_core_metamodel_inspect_model_MemberNode(object: org_apache_causeway_core_metamodel_inspect_model_MemberNode__gqlv_input): [org_apache_causeway_core_metamodel_inspect_model_MemberNode]
+  org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript(object: org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__gqlv_input): [org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript]
   university_admin_AdminMenu: university_admin_AdminMenu
   university_calc_Calculator: university_calc_Calculator
-  university_dept_Department(object: university_dept_Department__gqlv_input): university_dept_Department
+  university_dept_Department(object: university_dept_Department__gqlv_input): [university_dept_Department]
   university_dept_Departments: university_dept_Departments
-  university_dept_DeptHead(object: university_dept_DeptHead__gqlv_input): university_dept_DeptHead
+  university_dept_DeptHead(object: university_dept_DeptHead__gqlv_input): [university_dept_DeptHead]
   university_dept_DeptHeads: university_dept_DeptHeads
   university_dept_Staff: university_dept_Staff
-  university_dept_StaffMember(object: university_dept_StaffMember__gqlv_input): university_dept_StaffMember
+  university_dept_StaffMember(object: university_dept_StaffMember__gqlv_input): [university_dept_StaffMember]
 }
 
 type causeway_applib_DomainObjectList {
@@ -2775,6 +2775,7 @@ type university_dept_StaffMember__name__gqlv_property {
 type university_dept_StaffMember__photo__gqlv_property {
   datatype: String
   disabled: String
+  get: university_dept_StaffMember__photo__gqlv_property_blob
   hidden: Boolean
   set(photo: String): university_dept_StaffMember
   validate(photo: String): String


(causeway) 02/08: CAUSEWAY-3676: adds test to download from URL

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit f69ed4d8a990eaa7750a6b155dea793f3d8e8d7c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 15 00:00:49 2024 +0000

    CAUSEWAY-3676: adds test to download from URL
---
 ...est.find_department_and_add_staff_members._.gql | 70 ++++++++++++++++
 ...d_department_and_add_staff_members._.invoke.gql | 27 ------
 ..._department_and_add_staff_members.approved.json | 97 +++++++++++++++++++---
 ..._department_and_add_staff_members.choices._.gql | 22 -----
 .../queryandmutations/Department_IntegTest.java    | 22 +----
 ...d_staff_member_by_name_and_download_photo._.gql | 16 ++++
 ...member_by_name_and_download_photo.approved.json | 18 ++++
 .../e2e/queryandmutations/Staff_IntegTest.java     | 47 +++++++++++
 .../viewer/CausewayModuleViewerGraphqlViewer.java  |  7 +-
 .../viewer/controller/BlobBytesController.java     | 50 ++++++-----
 10 files changed, 271 insertions(+), 105 deletions(-)

diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql
new file mode 100644
index 0000000000..8363554ae5
--- /dev/null
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql
@@ -0,0 +1,70 @@
+{
+  Scenario(name: "can add staff members") {
+    Given {
+      university_dept_Departments {
+        findDepartmentByName {
+          invoke(name: "Classics") {
+            staffMembers {
+              get {
+                name {
+                  get
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    When {
+      university_dept_Departments {
+        findDepartmentByName {
+          invoke(name: "Classics") {
+            addStaffMembers {
+              params {
+                staffMembers {
+                  datatype
+                  choices {
+                    _gqlv_meta {
+                      id
+                      saveAs(ref: "staff-member")
+                    }
+                    name {
+                      get
+                    }
+                  }
+                }
+              }
+              invokeIdempotent(staffMembers: [{ref: "staff-member"}, {ref: "staff-member-2"}]) {
+                name {
+                  get
+                }
+                staffMembers {
+                  get {
+                    name {
+                      get
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    Then {
+      university_dept_Departments {
+        findDepartmentByName {
+          invoke(name: "Classics") {
+            staffMembers {
+              get {
+                name {
+                  get
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.invoke.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.invoke.gql
deleted file mode 100644
index 1b5452b974..0000000000
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.invoke.gql
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  university_dept_Departments {
-    findDepartmentByName {
-      invoke(name: "Classics") {
-        addStaffMembers {
-          params {
-            staffMembers {
-              datatype
-            }
-          }
-          invokeIdempotent(staffMembers: [{id: "$staffMemberId1"}, {id: "$staffMemberId2"}]) {
-            name {
-              get
-            }
-            staffMembers {
-              get {
-                name {
-                  get
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
index 8126e9ff36..960446e13a 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
@@ -1,18 +1,93 @@
 {
   "data" : {
-    "university_dept_Departments" : {
-      "findDepartmentByName" : {
-        "invoke" : {
-          "addStaffMembers" : {
-            "params" : {
+    "Scenario" : {
+      "Given" : {
+        "university_dept_Departments" : {
+          "findDepartmentByName" : {
+            "invoke" : {
               "staffMembers" : {
-                "datatype" : "university_dept_StaffMember"
+                "get" : [ {
+                  "name" : {
+                    "get" : "Gerry Jones"
+                  }
+                }, {
+                  "name" : {
+                    "get" : "Letitia Leadbetter"
+                  }
+                } ]
               }
-            },
-            "invokeIdempotent" : {
-              "name" : {
-                "get" : "Classics"
-              },
+            }
+          }
+        }
+      },
+      "When" : {
+        "university_dept_Departments" : {
+          "findDepartmentByName" : {
+            "invoke" : {
+              "addStaffMembers" : {
+                "params" : {
+                  "staffMembers" : {
+                    "datatype" : "university_dept_StaffMember",
+                    "choices" : [ {
+                      "_gqlv_meta" : {
+                        "id" : "15",
+                        "saveAs" : "staff-member"
+                      },
+                      "name" : {
+                        "get" : "John Gartner"
+                      }
+                    }, {
+                      "_gqlv_meta" : {
+                        "id" : "16",
+                        "saveAs" : "staff-member"
+                      },
+                      "name" : {
+                        "get" : "Margaret Randall"
+                      }
+                    }, {
+                      "_gqlv_meta" : {
+                        "id" : "14",
+                        "saveAs" : "staff-member"
+                      },
+                      "name" : {
+                        "get" : "Mervin Hughes"
+                      }
+                    } ]
+                  }
+                },
+                "invokeIdempotent" : {
+                  "name" : {
+                    "get" : "Classics"
+                  },
+                  "staffMembers" : {
+                    "get" : [ {
+                      "name" : {
+                        "get" : "Gerry Jones"
+                      }
+                    }, {
+                      "name" : {
+                        "get" : "John Gartner"
+                      }
+                    }, {
+                      "name" : {
+                        "get" : "Letitia Leadbetter"
+                      }
+                    }, {
+                      "name" : {
+                        "get" : "Margaret Randall"
+                      }
+                    } ]
+                  }
+                }
+              }
+            }
+          }
+        }
+      },
+      "Then" : {
+        "university_dept_Departments" : {
+          "findDepartmentByName" : {
+            "invoke" : {
               "staffMembers" : {
                 "get" : [ {
                   "name" : {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.choices._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.choices._.gql
deleted file mode 100644
index 0c429c93b9..0000000000
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.choices._.gql
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  university_dept_Departments {
-    findDepartmentByName {
-      invoke(name: "Classics") {
-        addStaffMembers {
-          params {
-            staffMembers {
-              choices {
-                _gqlv_meta {
-                  id
-                }
-                name {
-                  get
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
index 5db64cac19..a24e276e2f 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
@@ -127,28 +127,8 @@ public class Department_IntegTest extends Abstract_IntegTest {
     void find_department_and_add_staff_members() throws Exception {
 
         // when, then
-        String submit = submit("choices");
-
-        ObjectMapper mapper = new ObjectMapper();
-        JsonNode root = mapper.readTree(submit);
-
-        JsonNode staffMembersNode = root.at("/data/university_dept_Departments/findDepartmentByName/invoke/addStaffMembers/params/staffMembers/choices");
-
-        List<String> ids = new ArrayList<>();
-        staffMembersNode.forEach(staffMemberNode -> {
-            String id = staffMemberNode.get("_gqlv_meta").get("id").asText();
-            if (!_Strings.isNullOrEmpty(id)) {
-                ids.add(id);
-            }
-        });
-
-        Assertions.assertThat(ids).hasSize(3);
-
-        val replacements = _Maps.unmodifiable(
-                "$staffMemberId1", ids.get(0),
-                "$staffMemberId2", ids.get(1));
+        Approvals.verify(submit(), jsonOptions());
 
-        Approvals.verify(submit("invoke", replacements), jsonOptions());
     }
 
     @Test
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo._.gql
new file mode 100644
index 0000000000..51ac1345c4
--- /dev/null
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo._.gql
@@ -0,0 +1,16 @@
+{
+  university_dept_Staff {
+    findStaffMemberByName {
+      invoke(name: "Gerry Jones") {
+        name {
+          get
+        }
+        photo {
+          get {
+            bytes
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json
new file mode 100644
index 0000000000..8fe6c5418c
--- /dev/null
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json
@@ -0,0 +1,18 @@
+{
+  "data" : {
+    "university_dept_Staff" : {
+      "findStaffMemberByName" : {
+        "invoke" : {
+          "name" : {
+            "get" : "Gerry Jones"
+          },
+          "photo" : {
+            "get" : {
+              "bytes" : "///graphql/object/university.dept.StaffMember:13/photo/blobBytes"
+            }
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
index c06c622d7a..0dbe1d0d77 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
@@ -18,6 +18,11 @@
  */
 package org.apache.causeway.viewer.graphql.viewer.test.e2e.queryandmutations;
 
+import java.io.IOException;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
 import java.util.Optional;
 
 import org.approvaltests.Approvals;
@@ -36,6 +41,9 @@ import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.viewer.graphql.viewer.test.domain.dept.StaffMember;
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 
 //NOT USING @Transactional since we are running server within same transaction otherwise
 @Order(60)
@@ -112,4 +120,43 @@ public class Staff_IntegTest extends Abstract_IntegTest {
         Approvals.verify(submit(), jsonOptions());
 
     }
+
+    @Test
+    @UseReporter(DiffReporter.class)
+    void find_staff_member_by_name_and_download_photo() throws Exception {
+
+        String response = submit();
+        Approvals.verify(response, jsonOptions());
+
+        ObjectMapper mapper = new ObjectMapper();
+        JsonNode root = mapper.readTree(response);
+
+        String url = root
+                .at("/data/university_dept_Staff/findStaffMemberByName/invoke/photo/get/bytes")
+                .asText();
+
+        assertThat(url).matches("///graphql/object/university.dept.StaffMember:(\\d+)/photo/blobBytes");
+
+        val httpResponse = submitReturningBytes(url);
+
+        assertThat(httpResponse.statusCode()).isEqualTo(200);
+        byte[] bytes = httpResponse.body();
+        assertThat(bytes).isNotEmpty();
+
+    }
+
+    private HttpResponse<byte[]> submitReturningBytes(String url) throws IOException, InterruptedException {
+
+        val urlSuffix = url.substring(3); // strip off the '///' prefix
+        val uri = URI.create(String.format("http://0.0.0.0:%d/%s", port, urlSuffix));
+
+        HttpRequest httpRequest = HttpRequest.newBuilder().
+                uri(uri).
+                GET().
+                build();
+
+        HttpClient httpClient = HttpClient.newHttpClient();
+        return httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofByteArray());
+    }
+
 }
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
index ae85d6e6da..1c28790e91 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
@@ -18,6 +18,8 @@
  */
 package org.apache.causeway.viewer.graphql.viewer;
 
+import org.apache.causeway.viewer.graphql.viewer.controller.BlobBytesController;
+
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
 import org.springframework.boot.autoconfigure.graphql.GraphQlCorsProperties;
@@ -42,7 +44,10 @@ import org.apache.causeway.viewer.graphql.model.CausewayModuleViewerGraphqlModel
 
         // autoconfigurations
         GraphQlAutoConfiguration.class,
-        GraphQlWebMvcAutoConfiguration.class
+        GraphQlWebMvcAutoConfiguration.class,
+
+        // controllers
+        BlobBytesController.class
 })
 @EnableConfigurationProperties({
         GraphQlProperties.class, GraphQlCorsProperties.class
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
index fc5ae3e523..a72670ce79 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/BlobBytesController.java
@@ -10,6 +10,7 @@ import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import org.apache.causeway.applib.services.bookmark.Bookmark;
@@ -23,13 +24,37 @@ import lombok.Value;
 
 import java.util.Optional;
 
-@RestController(value = "/graphql/object")
+@RestController()
+@RequestMapping("/graphql/object")
 @RequiredArgsConstructor(onConstructor_ = {@Inject})
 public class BlobBytesController {
 
     private final BookmarkService bookmarkService;
     private final ObjectManager objectManager;
 
+    @GetMapping(value = "/{logicalTypeName}:{id}/{propertyId}/blobBytes")
+    public ResponseEntity<byte[]> propertyBlobBytes(
+            @PathVariable final String logicalTypeName,
+            @PathVariable final String id,
+            @PathVariable final String propertyId) {
+
+        return bookmarkService.lookup(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, id))
+                .map(objectManager::adapt)
+                .map(managedObject -> ManagedObjectAndPropertyIfAny.of(managedObject, managedObject.getSpecification().getProperty(propertyId)))
+                .filter(ManagedObjectAndPropertyIfAny::isPropertyPresent)
+                .map(ManagedObjectAndProperty::of)
+                .map(ManagedObjectAndProperty::value)
+                .map(ManagedObject::getPojo)
+                .filter(Blob.class::isInstance)
+                .map(Blob.class::cast)
+                .map(blob -> ResponseEntity.ok()
+                        .contentType(MediaType.APPLICATION_PDF)
+                        .header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(blob.getName()).build().toString())
+                        .contentLength(blob.getBytes().length)
+                        .body(blob.getBytes()))
+                .orElse(ResponseEntity.notFound().build());
+    }
+
     @Value(staticConstructor = "of")
     private static class ManagedObjectAndPropertyIfAny {
         ManagedObject owningObject;
@@ -50,31 +75,10 @@ public class BlobBytesController {
         ManagedObject owningObject;
         OneToOneAssociation property;
 
-        public ManagedObject value() {
+        ManagedObject value() {
             return property.get(owningObject);
         }
     }
 
-    @GetMapping(value = "/{logicalTypeName}:{id}/{propertyId}/blobBytes")
-    public ResponseEntity<byte[]> propertyBlobBytes(
-            @PathVariable final String logicalTypeName,
-            @PathVariable final String id,
-            @PathVariable final String propertyId) {
 
-        return bookmarkService.lookup(Bookmark.forLogicalTypeNameAndIdentifier(logicalTypeName, id))
-                .map(objectManager::adapt)
-                .map(managedObject -> ManagedObjectAndPropertyIfAny.of(managedObject, managedObject.getSpecification().getProperty(propertyId)))
-                .filter(ManagedObjectAndPropertyIfAny::isPropertyPresent)
-                .map(ManagedObjectAndProperty::of)
-                .map(ManagedObjectAndProperty::value)
-                .map(ManagedObject::getPojo)
-                .filter(Blob.class::isInstance)
-                .map(Blob.class::cast)
-                .map(blob -> ResponseEntity.ok()
-                        .contentType(MediaType.APPLICATION_PDF)
-                        .header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(blob.getName()).build().toString())
-                        .contentLength(blob.getBytes().length)
-                        .body(blob.getBytes()))
-                .orElse(ResponseEntity.notFound().build());
-    }
 }


(causeway) 03/08: CAUSEWAY-3676: scrubs bookmarks for repeatability; removes the ugly 'gqlv_' part of the default prefixes

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 9a2276ea4ab5760ecf68eb046465ee41a710b78a
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 15 06:38:42 2024 +0000

    CAUSEWAY-3676: scrubs bookmarks for repeatability; removes the ugly 'gqlv_' part of the default prefixes
---
 .../causeway/core/config/CausewayConfiguration.java      |  4 ++--
 ...CausewayViewerGraphqlTestModuleIntegTestAbstract.java | 16 +++++++++++++++-
 .../Department_IntegTest.find_all_departments._.gql      |  2 +-
 ...partment_IntegTest.find_all_departments.approved.json | 12 ++++++------
 ...st.find_department_and_add_staff_member_choices._.gql |  3 +--
 ...department_and_add_staff_member_choices.approved.json |  9 +++------
 ...IntegTest.find_department_and_add_staff_members._.gql |  3 +--
 ...t.find_department_and_add_staff_members.approved.json |  9 +++------
 ...ptHeadMutating_IntegTest.change_department_name._.gql |  2 +-
 .../StaffMutating_IntegTest.staff_member_edit_name._.gql |  2 +-
 ...f_IntegTest.create_staff_member_with_department._.gql |  4 ++--
 ...est.create_staff_member_with_department.approved.json |  4 ++--
 ...staff_member_by_name_and_download_photo.approved.json |  2 +-
 .../Staff_IntegTest.list_all_staff_members.approved.json | 10 +++++-----
 ...tment_IntegTest.find_department_and_change_name._.gql |  2 +-
 ...tegTest.find_department_and_change_name.approved.json |  2 +-
 16 files changed, 46 insertions(+), 40 deletions(-)

diff --git a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
index f5583682e6..36ef5f5891 100644
--- a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
+++ b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java
@@ -2389,7 +2389,7 @@ public class CausewayConfiguration {
                  * Note that field names <i>cannot</i> being with &quot;__&quot;, as that is reserved by the
                  * underlying GraphQL implementation.
                  */
-                private String fieldName = "_gqlv_meta";
+                private String fieldName = "_meta";
             }
 
             private final Lookup lookup = new Lookup();
@@ -2412,7 +2412,7 @@ public class CausewayConfiguration {
                 /**
                  * The name of the synthetic argument of mutators representing the target domain object.
                  */
-                private String targetArgName = "_gqlv_target";
+                private String targetArgName = "_target";
             }
 
             private final ScalarMarshaller scalarMarshaller = new ScalarMarshaller();
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java
index 227a2eebea..e46df99789 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java
@@ -230,10 +230,24 @@ public abstract class CausewayViewerGraphqlTestModuleIntegTestAbstract {
         return _Resources.loadAsString(getClass(), resourceName, StandardCharsets.UTF_8);
     }
 
+    public enum BookmarkOptions {
+        SCRUB,
+        PRESERVE,
+        ;
+    }
+
     protected Options jsonOptions() {
+        return jsonOptions(BookmarkOptions.SCRUB);
+    }
+
+    protected Options jsonOptions(BookmarkOptions bookmarkOptions) {
         return new Options().withScrubber(s -> {
             try {
-                return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectMapper.readTree(s));
+                String prettyJson = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectMapper.readTree(s));
+                if (bookmarkOptions == BookmarkOptions.SCRUB) {
+                    prettyJson = prettyJson.replaceAll(":\\d+/", ":NNN/");
+                }
+                return prettyJson;
             } catch (JsonProcessingException e) {
                 throw new RuntimeException(e);
             }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments._.gql
index 5b447f0071..e158df0ea0 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments._.gql
@@ -6,7 +6,7 @@
           get
           datatype
         }
-        _gqlv_meta {
+        _meta {
           logicalTypeName
           version
         }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments.approved.json
index 4c490f08d8..2295666c39 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_all_departments.approved.json
@@ -7,7 +7,7 @@
             "get" : "Civil Engineering",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
@@ -16,7 +16,7 @@
             "get" : "Classics",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
@@ -25,7 +25,7 @@
             "get" : "Mathematics",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
@@ -34,7 +34,7 @@
             "get" : "Pathology",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
@@ -43,7 +43,7 @@
             "get" : "Physics",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
@@ -52,7 +52,7 @@
             "get" : "Textiles",
             "datatype" : "java_lang_String"
           },
-          "_gqlv_meta" : {
+          "_meta" : {
             "logicalTypeName" : "university.dept.Department",
             "version" : null
           }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql
index 3f8207e675..a023f2471d 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices._.gql
@@ -8,8 +8,7 @@
               params {
                 staffMembers {
                   choices {
-                    _gqlv_meta {
-                      id
+                    _meta {
                       saveAs(ref: "staff-member-choices")
                     }
                     name {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json
index 5d9cf1af12..b7e21cff07 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_member_choices.approved.json
@@ -9,24 +9,21 @@
                 "params" : {
                   "staffMembers" : {
                     "choices" : [ {
-                      "_gqlv_meta" : {
-                        "id" : "15",
+                      "_meta" : {
                         "saveAs" : "staff-member-choices"
                       },
                       "name" : {
                         "get" : "John Gartner"
                       }
                     }, {
-                      "_gqlv_meta" : {
-                        "id" : "16",
+                      "_meta" : {
                         "saveAs" : "staff-member-choices"
                       },
                       "name" : {
                         "get" : "Margaret Randall"
                       }
                     }, {
-                      "_gqlv_meta" : {
-                        "id" : "14",
+                      "_meta" : {
                         "saveAs" : "staff-member-choices"
                       },
                       "name" : {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql
index 8363554ae5..a4f1332653 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members._.gql
@@ -24,8 +24,7 @@
                 staffMembers {
                   datatype
                   choices {
-                    _gqlv_meta {
-                      id
+                    _meta {
                       saveAs(ref: "staff-member")
                     }
                     name {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
index 960446e13a..4c28283be5 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.find_department_and_add_staff_members.approved.json
@@ -29,24 +29,21 @@
                   "staffMembers" : {
                     "datatype" : "university_dept_StaffMember",
                     "choices" : [ {
-                      "_gqlv_meta" : {
-                        "id" : "15",
+                      "_meta" : {
                         "saveAs" : "staff-member"
                       },
                       "name" : {
                         "get" : "John Gartner"
                       }
                     }, {
-                      "_gqlv_meta" : {
-                        "id" : "16",
+                      "_meta" : {
                         "saveAs" : "staff-member"
                       },
                       "name" : {
                         "get" : "Margaret Randall"
                       }
                     }, {
-                      "_gqlv_meta" : {
-                        "id" : "14",
+                      "_meta" : {
                         "saveAs" : "staff-member"
                       },
                       "name" : {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.change_department_name._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.change_department_name._.gql
index 2d140978b5..a9fc915d22 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.change_department_name._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.change_department_name._.gql
@@ -1,6 +1,6 @@
 mutation {
   university_dept_Department__changeName(
-      _gqlv_target: {id : "$departmentId"},
+      _target: {id : "$departmentId"},
       newName: "Classics and Ancient History"
   ) {
     name {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.staff_member_edit_name._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.staff_member_edit_name._.gql
index c251ee695e..0e5b98b75c 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.staff_member_edit_name._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.staff_member_edit_name._.gql
@@ -1,6 +1,6 @@
 mutation {
   university_dept_StaffMember__name(
-      _gqlv_target: {id: "$staffMemberId"},
+      _target: {id: "$staffMemberId"},
       name: "Jonathon Gartner"
   ) {
     name {
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
index 0a7147f775..5876019ffb 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department._.gql
@@ -5,7 +5,7 @@
       university_dept_Departments {
         findDepartmentByName {
           invoke(name: "Classics") {
-            _gqlv_meta {
+            _meta {
               saveAs(ref: "classics")
             }
           }
@@ -26,7 +26,7 @@
                 }
               }
             }
-            _gqlv_meta {
+            _meta {
               title
               logicalTypeName
               version
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
index 5a06846af8..1929ae96ef 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
@@ -6,7 +6,7 @@
         "university_dept_Departments" : {
           "findDepartmentByName" : {
             "invoke" : {
-              "_gqlv_meta" : {
+              "_meta" : {
                 "saveAs" : "classics"
               }
             }
@@ -27,7 +27,7 @@
                   }
                 }
               },
-              "_gqlv_meta" : {
+              "_meta" : {
                 "title" : "Untitled Staff Member",
                 "logicalTypeName" : "university.dept.StaffMember",
                 "version" : null,
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json
index 8fe6c5418c..376620cb6a 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.find_staff_member_by_name_and_download_photo.approved.json
@@ -8,7 +8,7 @@
           },
           "photo" : {
             "get" : {
-              "bytes" : "///graphql/object/university.dept.StaffMember:13/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
index 58c2e97788..31c2a1ca5a 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.list_all_staff_members.approved.json
@@ -13,7 +13,7 @@
             "get" : {
               "name" : "StaffMember-photo-Bar.pdf",
               "mimeType" : "application/pdf",
-              "bytes" : "///graphql/object/university.dept.StaffMember:658/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         }, {
@@ -27,7 +27,7 @@
             "get" : {
               "name" : null,
               "mimeType" : null,
-              "bytes" : "///graphql/object/university.dept.StaffMember:660/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         }, {
@@ -41,7 +41,7 @@
             "get" : {
               "name" : "StaffMember-photo-Foo.pdf",
               "mimeType" : "application/pdf",
-              "bytes" : "///graphql/object/university.dept.StaffMember:657/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         }, {
@@ -55,7 +55,7 @@
             "get" : {
               "name" : null,
               "mimeType" : null,
-              "bytes" : "///graphql/object/university.dept.StaffMember:661/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         }, {
@@ -69,7 +69,7 @@
             "get" : {
               "name" : "StaffMember-photo-Fizz.pdf",
               "mimeType" : "application/pdf",
-              "bytes" : "///graphql/object/university.dept.StaffMember:659/photo/blobBytes"
+              "bytes" : "///graphql/object/university.dept.StaffMember:NNN/photo/blobBytes"
             }
           }
         } ]
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name._.gql b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name._.gql
index 351faedeb6..0d1c229a2e 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name._.gql
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name._.gql
@@ -6,7 +6,7 @@
       university_dept_Departments {
         findDepartmentByName {
           invoke(name: "Classics") {
-            _gqlv_meta {
+            _meta {
               saveAs(ref: "classics_dept")
             }
           }
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name.approved.json
index 8f6b6c89f8..d234085e62 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.find_department_and_change_name.approved.json
@@ -6,7 +6,7 @@
         "university_dept_Departments" : {
           "findDepartmentByName" : {
             "invoke" : {
-              "_gqlv_meta" : {
+              "_meta" : {
                 "saveAs" : "classics_dept"
               }
             }


(causeway) 07/08: CAUSEWAY-3676: further removal of unnecessary work

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 74bcab882d107d63ce5840b3274523f2e8f3f61d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Feb 16 17:55:47 2024 +0000

    CAUSEWAY-3676: further removal of unnecessary work
---
 .../causeway/viewer/graphql/model/domain/GqlvDomainObject.java   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
index 71a88f83e6..a86b93ea5a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainObject.java
@@ -74,6 +74,12 @@ public class GqlvDomainObject
         this.objectSpecification = objectSpecification;
         gqlObjectTypeBuilder.description(objectSpecification.getDescription());
 
+        if(isBuilt()) {
+            this.meta = null;
+            this.gqlInputObjectType = null;
+            return;
+        }
+
         addChildFieldFor(this.meta = new GqlvMeta(this, context));
 
         val inputObjectTypeBuilder = newInputObject().name(TypeNames.inputTypeNameFor(objectSpecification));
@@ -158,6 +164,9 @@ public class GqlvDomainObject
 
     @Override
     protected void addDataFetchersForChildren() {
+        if(meta == null) {
+            return;
+        }
         meta.addDataFetcher(this);
         properties.forEach((id, property) -> property.addDataFetcher(this));
         collections.forEach((id, collection) -> collection.addDataFetcher(this));


(causeway) 05/08: CAUSEWAY-3676: reorg imports is all

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 70e30a4e95909b3b1245c4845ef072fc62d03562
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 15 08:21:03 2024 +0000

    CAUSEWAY-3676: reorg imports is all
---
 .../causeway/viewer/graphql/model/context/Context.java | 14 +++++++-------
 .../viewer/graphql/model/domain/GqlvAbstract.java      |  5 +++--
 .../graphql/model/domain/GqlvAbstractCustom.java       |  8 ++++----
 .../viewer/graphql/model/domain/GqlvAction.java        | 10 ++++------
 .../viewer/graphql/model/domain/GqlvActionInvoke.java  |  2 +-
 .../viewer/graphql/model/domain/GqlvActionParam.java   |  1 -
 .../model/domain/GqlvActionParamAutoComplete.java      |  2 +-
 .../graphql/model/domain/GqlvActionParamChoices.java   |  2 +-
 .../graphql/model/domain/GqlvActionParamDisabled.java  |  4 ++--
 .../graphql/model/domain/GqlvActionParamHidden.java    |  4 ++--
 .../graphql/model/domain/GqlvActionParamValidate.java  |  4 ++--
 .../viewer/graphql/model/domain/GqlvActionParams.java  |  5 +++--
 .../graphql/model/domain/GqlvActionValidity.java       |  2 +-
 .../graphql/model/domain/GqlvAssociationDatatype.java  |  5 +++--
 .../viewer/graphql/model/domain/GqlvDomainService.java |  4 ++--
 .../viewer/graphql/model/domain/GqlvMember.java        |  4 ++--
 .../graphql/model/domain/GqlvMemberDisabled.java       |  2 +-
 .../viewer/graphql/model/domain/GqlvMemberHidden.java  |  2 +-
 .../causeway/viewer/graphql/model/domain/GqlvMeta.java |  3 ++-
 .../viewer/graphql/model/domain/GqlvMetaCssClass.java  |  6 +++---
 .../viewer/graphql/model/domain/GqlvMetaGrid.java      |  6 +++---
 .../viewer/graphql/model/domain/GqlvMetaIconName.java  |  6 +++---
 .../viewer/graphql/model/domain/GqlvMetaId.java        |  6 +++---
 .../viewer/graphql/model/domain/GqlvMetaLayout.java    |  6 +++---
 .../viewer/graphql/model/domain/GqlvMetaSaveAs.java    |  4 +---
 .../viewer/graphql/model/domain/GqlvMetaVersion.java   |  6 +++---
 .../viewer/graphql/model/domain/GqlvProperty.java      |  2 --
 .../model/domain/GqlvPropertyGetBlobAbstract.java      |  3 +--
 .../graphql/model/domain/GqlvPropertyGetBlobBytes.java |  8 ++++----
 .../model/domain/GqlvPropertyGetClobAbstract.java      |  2 --
 .../viewer/graphql/model/domain/GqlvPropertySet.java   |  9 +++++----
 .../graphql/model/domain/GqlvPropertyValidate.java     |  4 ++--
 .../viewer/graphql/model/domain/GqlvScenario.java      |  8 ++++----
 .../viewer/graphql/model/domain/GqlvScenarioName.java  |  5 +++--
 .../viewer/graphql/model/domain/GqlvScenarioStep.java  |  4 ++--
 .../model/marshallers/ScalarMarshallerBigDecimal.java  | 10 ++++------
 .../model/marshallers/ScalarMarshallerBigInteger.java  | 10 ++++------
 .../marshallers/ScalarMarshallerBooleanPrimitive.java  | 10 ++++------
 .../marshallers/ScalarMarshallerBooleanWrapper.java    | 10 ++++------
 .../marshallers/ScalarMarshallerBytePrimitive.java     |  3 +--
 .../model/marshallers/ScalarMarshallerByteWrapper.java |  9 ++++-----
 .../marshallers/ScalarMarshallerCharPrimitive.java     |  9 ++++-----
 .../marshallers/ScalarMarshallerCharacterWrapper.java  |  3 +--
 .../marshallers/ScalarMarshallerDoublePrimitive.java   | 10 ++++------
 .../marshallers/ScalarMarshallerDoubleWrapper.java     | 10 ++++------
 .../marshallers/ScalarMarshallerFloatPrimitive.java    | 10 ++++------
 .../marshallers/ScalarMarshallerFloatWrapper.java      |  6 ++----
 .../marshallers/ScalarMarshallerIntPrimitive.java      | 10 ++++------
 .../marshallers/ScalarMarshallerIntegerWrapper.java    | 10 ++++------
 .../marshallers/ScalarMarshallerJdk8LocalDate.java     | 10 ++++------
 .../marshallers/ScalarMarshallerJdk8ZonedDateTime.java |  9 ++++-----
 .../marshallers/ScalarMarshallerJodaDateTime.java      | 11 +++++------
 .../marshallers/ScalarMarshallerJodaLocalDate.java     | 12 +++++-------
 .../marshallers/ScalarMarshallerLongPrimitive.java     | 10 ++++------
 .../model/marshallers/ScalarMarshallerLongWrapper.java | 10 ++++------
 .../model/marshallers/ScalarMarshallerObject.java      |  4 ++--
 .../marshallers/ScalarMarshallerShortPrimitive.java    | 10 ++++------
 .../marshallers/ScalarMarshallerShortWrapper.java      | 10 ++++------
 .../model/marshallers/ScalarMarshallerString.java      | 10 ++++------
 .../marshallers/ScalarMarshallerVoidPrimitive.java     |  9 ++++-----
 .../model/marshallers/ScalarMarshallerVoidWrapper.java |  3 +--
 .../graphql/model/registry/GraphQLTypeRegistry.java    | 18 +++++++++---------
 .../graphql/model/toplevel/GqlvTopLevelMutation.java   |  5 +++--
 .../graphql/model/toplevel/GqlvTopLevelQuery.java      |  4 ++--
 .../viewer/graphql/model/types/ScalarMapper.java       |  2 +-
 .../types/ScalarMapperUsingScalarMarshallers.java      | 10 +++++-----
 .../viewer/graphql/model/types/TypeMapper.java         |  8 ++++----
 .../viewer/graphql/model/types/TypeMapperDefault.java  | 17 +++++++++--------
 .../test/e2e/queryandmutations/Admin_IntegTest.java    |  1 +
 .../e2e/queryandmutations/Calculator_IntegTest.java    |  1 +
 .../DepartmentMutating_IntegTest.java                  |  1 +
 .../e2e/queryandmutations/Department_IntegTest.java    | 10 +---------
 .../queryandmutations/DeptHeadMutating_IntegTest.java  |  1 +
 .../test/e2e/queryandmutations/DeptHead_IntegTest.java |  3 +--
 .../e2e/queryandmutations/StaffMutating_IntegTest.java |  1 +
 .../test/e2e/queryandmutations/Staff_IntegTest.java    | 11 +++++++----
 .../viewer/test/e2e/scenario/Calculator_IntegTest.java |  1 +
 .../viewer/test/e2e/scenario/Department_IntegTest.java |  1 +
 .../test/schema/GqlSchemaQuery_print_IntegTest.java    |  1 +
 .../viewer/CausewayModuleViewerGraphqlViewer.java      |  3 +--
 .../viewer/auth/UserMementoProviderDefault.java        |  6 +++---
 .../graphql/viewer/controller/ResourceController.java  |  9 ++++-----
 ...yncExecutionStrategyResolvingWithinInteraction.java | 10 +++++-----
 .../viewer/integration/GraphQlSourceForCauseway.java   |  7 ++++---
 84 files changed, 242 insertions(+), 285 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/context/Context.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/context/Context.java
index 4278015d26..4eeed6e2b5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/context/Context.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/context/Context.java
@@ -18,8 +18,15 @@
  */
 package org.apache.causeway.viewer.graphql.model.context;
 
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
 import graphql.schema.GraphQLCodeRegistry;
 
+import org.springframework.stereotype.Component;
+
 import org.apache.causeway.applib.id.HasLogicalType;
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.applib.services.registry.ServiceRegistry;
@@ -36,15 +43,8 @@ import org.apache.causeway.viewer.graphql.model.domain.GqlvDomainService;
 import org.apache.causeway.viewer.graphql.model.registry.GraphQLTypeRegistry;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import org.springframework.stereotype.Component;
-
 import lombok.RequiredArgsConstructor;
 
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
 @Component
 @RequiredArgsConstructor
 public class Context {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstract.java
index 5df220cf9b..77f9681592 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstract.java
@@ -18,10 +18,11 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import org.apache.causeway.viewer.graphql.model.context.Context;
-
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLFieldDefinition;
+
+import org.apache.causeway.viewer.graphql.model.context.Context;
+
 import lombok.Getter;
 
 public abstract class GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
index 5d4e78a012..6c955fbb92 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAbstractCustom.java
@@ -18,6 +18,8 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import java.util.Optional;
+
 import graphql.schema.FieldCoordinates;
 import graphql.schema.GraphQLFieldDefinition;
 import graphql.schema.GraphQLObjectType;
@@ -25,15 +27,13 @@ import graphql.schema.GraphQLObjectType;
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 import static graphql.schema.GraphQLObjectType.newObject;
 
-import org.apache.causeway.viewer.graphql.model.context.Context;
-
 import org.springframework.lang.Nullable;
 
+import org.apache.causeway.viewer.graphql.model.context.Context;
+
 import lombok.AccessLevel;
 import lombok.Getter;
 
-import java.util.Optional;
-
 public abstract class GqlvAbstractCustom extends GqlvAbstract implements Parent {
 
     protected final GraphQLObjectType.Builder gqlObjectTypeBuilder;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
index 7c46953a23..48cae6a1af 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAction.java
@@ -23,10 +23,13 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
 
+import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLArgument;
+import graphql.schema.GraphQLFieldDefinition;
+
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
@@ -37,11 +40,6 @@ import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import static org.apache.causeway.core.config.CausewayConfiguration.Viewer.Graphql.ApiVariant.QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT;
-
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLArgument;
-import graphql.schema.GraphQLFieldDefinition;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionInvoke.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionInvoke.java
index 2d7391f43f..dd8ab2a702 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionInvoke.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionInvoke.java
@@ -35,13 +35,13 @@ import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.exceptions.DisabledException;
 import org.apache.causeway.viewer.graphql.model.exceptions.HiddenException;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
index 6cf6e6df7a..a989c38b4a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParam.java
@@ -34,7 +34,6 @@ import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationP
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
 import lombok.Getter;
-import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
 @Log4j2
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamAutoComplete.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamAutoComplete.java
index 87022bf123..9d5e3083ed 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamAutoComplete.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamAutoComplete.java
@@ -38,12 +38,12 @@ package org.apache.causeway.viewer.graphql.model.domain;
  import org.apache.causeway.core.metamodel.interactions.managed.ParameterNegotiationModel;
  import org.apache.causeway.core.metamodel.object.ManagedObject;
  import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
- import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
  import org.apache.causeway.viewer.graphql.model.context.Context;
  import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+ import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
  import lombok.val;
  import lombok.extern.log4j.Log4j2;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamChoices.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamChoices.java
index 1090855793..573a49b9c1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamChoices.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamChoices.java
@@ -36,12 +36,12 @@ package org.apache.causeway.viewer.graphql.model.domain;
  import org.apache.causeway.core.metamodel.interactions.managed.ParameterNegotiationModel;
  import org.apache.causeway.core.metamodel.object.ManagedObject;
  import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
- import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
  import org.apache.causeway.viewer.graphql.model.context.Context;
  import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+ import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
  import lombok.val;
  import lombok.extern.log4j.Log4j2;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamDisabled.java
index e324829774..3b4d472110 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamDisabled.java
@@ -20,6 +20,7 @@ package org.apache.causeway.viewer.graphql.model.domain;
 
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLFieldDefinition;
+import graphql.schema.GraphQLOutputType;
 
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
@@ -28,14 +29,13 @@ import org.apache.causeway.commons.collections.Can;
 import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import graphql.schema.GraphQLOutputType;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamHidden.java
index 24524fc935..00d88d4e66 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamHidden.java
@@ -20,6 +20,7 @@ package org.apache.causeway.viewer.graphql.model.domain;
 
  import graphql.schema.DataFetchingEnvironment;
  import graphql.schema.GraphQLFieldDefinition;
+ import graphql.schema.GraphQLOutputType;
 
  import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
@@ -28,14 +29,13 @@ package org.apache.causeway.viewer.graphql.model.domain;
  import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
  import org.apache.causeway.core.metamodel.object.ManagedObject;
  import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
- import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
  import org.apache.causeway.viewer.graphql.model.context.Context;
  import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
  import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+ import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
- import graphql.schema.GraphQLOutputType;
  import lombok.val;
  import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamValidate.java
index 3043f7570e..18d7efb80f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParamValidate.java
@@ -20,6 +20,7 @@ package org.apache.causeway.viewer.graphql.model.domain;
 
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLFieldDefinition;
+import graphql.schema.GraphQLOutputType;
 
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
@@ -28,14 +29,13 @@ import org.apache.causeway.commons.collections.Can;
 import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionParameterProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import graphql.schema.GraphQLOutputType;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
index 0eccf8d435..5e4b9e05ef 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionParams.java
@@ -22,6 +22,9 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLFieldDefinition;
+
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.commons.collections.Can;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
@@ -34,8 +37,6 @@ import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
 import lombok.Getter;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionValidity.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionValidity.java
index c33847e1cc..ae8ff6f8d7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionValidity.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvActionValidity.java
@@ -32,11 +32,11 @@ import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectActionParameter;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectActionProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationDatatype.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationDatatype.java
index b49248cfa8..02b5a220e5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationDatatype.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvAssociationDatatype.java
@@ -18,14 +18,15 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectAssociationProvider;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
 import lombok.val;
 
 public abstract class GqlvAssociationDatatype<T extends ObjectAssociation> extends GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
index 7a51948524..845d93fd0a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvDomainService.java
@@ -21,14 +21,14 @@ package org.apache.causeway.viewer.graphql.model.domain;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import graphql.schema.DataFetchingEnvironment;
+
 import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
 import org.apache.causeway.core.metamodel.spec.feature.MixedIn;
 import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.schema.DataFetchingEnvironment;
-
 import lombok.Getter;
 import lombok.val;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMember.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMember.java
index be1ab35bcb..84e251673c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMember.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMember.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.schema.DataFetchingEnvironment;
+
 import org.apache.causeway.core.metamodel.spec.feature.ObjectMember;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 
-import graphql.schema.DataFetchingEnvironment;
-
 import lombok.Getter;
 
 public abstract class GqlvMember<T extends ObjectMember, H extends GqlvMember.Holder>
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberDisabled.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberDisabled.java
index b4ca62fac5..655dd09176 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberDisabled.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberDisabled.java
@@ -19,6 +19,7 @@
 package org.apache.causeway.viewer.graphql.model.domain;
 
 import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLOutputType;
 
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
@@ -31,7 +32,6 @@ import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 
-import graphql.schema.GraphQLOutputType;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberHidden.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberHidden.java
index 808a61d130..e4a71fe928 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberHidden.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMemberHidden.java
@@ -19,6 +19,7 @@
 package org.apache.causeway.viewer.graphql.model.domain;
 
 import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLOutputType;
 
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
@@ -31,7 +32,6 @@ import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectMemberProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 
-import graphql.schema.GraphQLOutputType;
 import lombok.val;
 import lombok.extern.log4j.Log4j2;
 
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
index bd12ca4380..9dfa5ede87 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
@@ -21,6 +21,8 @@ package org.apache.causeway.viewer.graphql.model.domain;
 import java.util.Objects;
 import java.util.Optional;
 
+import graphql.schema.DataFetchingEnvironment;
+
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.applib.services.metamodel.BeanSort;
@@ -34,7 +36,6 @@ import org.apache.causeway.core.metamodel.objectmanager.ObjectManager;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 
-import graphql.schema.DataFetchingEnvironment;
 import lombok.val;
 
 public class GqlvMeta extends GqlvAbstractCustom {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaCssClass.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaCssClass.java
index 2931bf5383..77d9dd781c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaCssClass.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaCssClass.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaCssClass extends GqlvAbstract {
 
     public GqlvMetaCssClass(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaGrid.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaGrid.java
index ee22f29908..a9ab27a51a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaGrid.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaGrid.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaGrid extends GqlvAbstract {
 
     public GqlvMetaGrid(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaIconName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaIconName.java
index 6fbbd5d836..d6b841fde6 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaIconName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaIconName.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaIconName extends GqlvAbstract {
 
     public GqlvMetaIconName(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaId.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaId.java
index 8cca8465d6..0d1e170ce7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaId.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaId.java
@@ -18,14 +18,14 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 import static graphql.schema.GraphQLNonNull.nonNull;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaId extends GqlvAbstract {
 
     public GqlvMetaId(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaLayout.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaLayout.java
index 56657b8400..2a17f67e74 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaLayout.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaLayout.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaLayout extends GqlvAbstract {
 
     public GqlvMetaLayout(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
index 62d54a1567..b036fa5d84 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaSaveAs.java
@@ -23,13 +23,11 @@ import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLArgument;
 
-import java.util.concurrent.atomic.AtomicInteger;
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-
 public class GqlvMetaSaveAs extends GqlvAbstract {
 
     public GqlvMetaSaveAs(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaVersion.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaVersion.java
index 73dd44a38f..64297d7d13 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaVersion.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMetaVersion.java
@@ -18,13 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
-
 public class GqlvMetaVersion extends GqlvAbstract {
 
     public GqlvMetaVersion(final Context context) {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
index f6ffed52d3..4cb27880ab 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvProperty.java
@@ -23,9 +23,7 @@ import graphql.schema.GraphQLFieldDefinition;
 
 import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.applib.value.Clob;
-import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
-import org.apache.causeway.core.metamodel.spec.feature.ObjectAction;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
index b2a9d79136..b5d0b0ec4d 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobAbstract.java
@@ -23,14 +23,13 @@ import java.util.function.Function;
 
 import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLFieldDefinition;
 
 import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
-import graphql.schema.GraphQLFieldDefinition;
-
 import lombok.val;
 
 public abstract class GqlvPropertyGetBlobAbstract extends GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
index 5e2246d39c..2c1fe83471 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetBlobBytes.java
@@ -18,16 +18,16 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import graphql.schema.DataFetchingEnvironment;
-
-import lombok.val;
-
 import java.util.Optional;
 
+import graphql.schema.DataFetchingEnvironment;
+
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
+import lombok.val;
+
 public class GqlvPropertyGetBlobBytes extends GqlvPropertyGetBlobAbstract {
 
     public GqlvPropertyGetBlobBytes(
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java
index 87107f919c..aa5e3eeb4a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyGetClobAbstract.java
@@ -28,8 +28,6 @@ import graphql.schema.GraphQLFieldDefinition;
 import org.apache.causeway.applib.value.Blob;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstract;
-import org.apache.causeway.viewer.graphql.model.domain.GqlvPropertyGet;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 
 import lombok.val;
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertySet.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertySet.java
index a7e764d6ad..d45109e3a5 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertySet.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertySet.java
@@ -18,10 +18,13 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-
 import java.util.Map;
 
+import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLFieldDefinition;
+
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+
 import org.apache.causeway.applib.annotation.Where;
 import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
@@ -35,8 +38,6 @@ import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationP
 import org.apache.causeway.viewer.graphql.model.mmproviders.OneToOneAssociationProvider;
 import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLFieldDefinition;
 import lombok.val;
 
 public class GqlvPropertySet extends GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyValidate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyValidate.java
index ce6f42ad22..6eb5511c23 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyValidate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvPropertyValidate.java
@@ -20,19 +20,19 @@ package org.apache.causeway.viewer.graphql.model.domain;
 
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLFieldDefinition;
+import graphql.schema.GraphQLOutputType;
 
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.fetcher.BookmarkedPojo;
 import org.apache.causeway.viewer.graphql.model.mmproviders.ObjectSpecificationProvider;
 import org.apache.causeway.viewer.graphql.model.mmproviders.OneToOneAssociationProvider;
+import org.apache.causeway.viewer.graphql.model.types.TypeMapper;
 
-import graphql.schema.GraphQLOutputType;
 import lombok.val;
 
 public class GqlvPropertyValidate extends GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
index 07e4f851bf..a57c16bde0 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenario.java
@@ -18,14 +18,14 @@
  */
 package org.apache.causeway.viewer.graphql.model.domain;
 
-import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
-
-import org.apache.causeway.viewer.graphql.model.context.Context;
-
 import graphql.Scalars;
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLArgument;
 
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+
+import org.apache.causeway.viewer.graphql.model.context.Context;
+
 /**
  * Exposes a domain service (view model or entity) via the GQL viewer.
  */
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
index 1769b6dade..182ca46f01 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioName.java
@@ -1,11 +1,12 @@
 package org.apache.causeway.viewer.graphql.model.domain;
 
+import graphql.Scalars;
+import graphql.schema.DataFetchingEnvironment;
+
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
-import graphql.Scalars;
-import graphql.schema.DataFetchingEnvironment;
 import lombok.val;
 
 public class GqlvScenarioName extends GqlvAbstract {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
index 4411e63aa5..785f4dcf93 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvScenarioStep.java
@@ -6,11 +6,11 @@ import java.util.Objects;
 
 import graphql.schema.DataFetchingEnvironment;
 
-import lombok.val;
-
 import org.apache.causeway.applib.services.metamodel.BeanSort;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 
+import lombok.val;
+
 public class GqlvScenarioStep
         extends GqlvAbstractCustom
         implements Parent {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigDecimal.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigDecimal.java
index 6b189fe064..515a3f905a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigDecimal.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigDecimal.java
@@ -18,21 +18,19 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import java.math.BigDecimal;
 
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 /**
  * Maps to a string to avoid loss of precision.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigInteger.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigInteger.java
index 6b44632538..4e14d0723a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigInteger.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBigInteger.java
@@ -18,21 +18,19 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import java.math.BigInteger;
 
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 /**
  * Maps to a string to avoid loss of precision.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanPrimitive.java
index c6048da4b9..2fc85f0431 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanPrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanWrapper.java
index 08955dbee8..81d1759152 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBooleanWrapper.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBytePrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBytePrimitive.java
index 9a05974c08..b7b198c6c1 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBytePrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerBytePrimitive.java
@@ -23,12 +23,11 @@ import javax.inject.Inject;
 
 import graphql.Scalars;
 
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
-
 import org.springframework.stereotype.Component;
 
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
 
 @Component
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerByteWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerByteWrapper.java
index 49ff2274e6..18016d6223 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerByteWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerByteWrapper.java
@@ -18,18 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
+import graphql.Scalars;
+
+import org.springframework.stereotype.Component;
+
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
-
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharPrimitive.java
index 0a6536dc72..6db6b0898f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharPrimitive.java
@@ -18,18 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
+import graphql.Scalars;
+
+import org.springframework.stereotype.Component;
+
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
-
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharacterWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharacterWrapper.java
index c63ed294b5..e8c96f79f2 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharacterWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerCharacterWrapper.java
@@ -23,12 +23,11 @@ import javax.inject.Inject;
 
 import graphql.Scalars;
 
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
-
 import org.springframework.stereotype.Component;
 
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
 
 @Component
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoublePrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoublePrimitive.java
index 112a0a99a5..53647f6166 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoublePrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoublePrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoubleWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoubleWrapper.java
index 9da9207f5b..582c1d73b7 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoubleWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerDoubleWrapper.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatPrimitive.java
index d7f17015b5..a2bc58347e 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatPrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatWrapper.java
index 0604a64e71..299caf77ae 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerFloatWrapper.java
@@ -23,13 +23,11 @@ import javax.inject.Inject;
 
 import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
-
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
-
 import org.springframework.stereotype.Component;
 
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
 
 @Component
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntPrimitive.java
index 4e517b2ff5..94de2c3dd3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntPrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntegerWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntegerWrapper.java
index 4166c9bdfc..08549cc575 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntegerWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerIntegerWrapper.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8LocalDate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8LocalDate.java
index 92146c37e8..dd1a378690 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8LocalDate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8LocalDate.java
@@ -18,22 +18,20 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8ZonedDateTime.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8ZonedDateTime.java
index 591fbb5fee..6451bf629a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8ZonedDateTime.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJdk8ZonedDateTime.java
@@ -18,21 +18,20 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
+import graphql.Scalars;
+
+import org.springframework.stereotype.Component;
+
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
-
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaDateTime.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaDateTime.java
index c50b2df9be..94888ae654 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaDateTime.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaDateTime.java
@@ -18,20 +18,19 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
-import org.apache.causeway.core.config.CausewayConfiguration;
-
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
+import graphql.Scalars;
 
 import org.joda.time.DateTime;
 
 import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
+
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaLocalDate.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaLocalDate.java
index a1847b1f60..06739664e6 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaLocalDate.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerJodaLocalDate.java
@@ -18,21 +18,19 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
-import org.apache.causeway.core.config.CausewayConfiguration;
-
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
+import graphql.Scalars;
 
 import org.joda.time.LocalDate;
 
 import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
+
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongPrimitive.java
index b8b0ca9061..62f059336a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongPrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 /**
  * Maps to a string to avoid loss of precision.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongWrapper.java
index 1f12f2e665..190b372a8c 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerLongWrapper.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 /**
  * Maps to a string to avoid loss of precision.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerObject.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerObject.java
index 195fed4759..3d1c1b9f6a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerObject.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerObject.java
@@ -21,14 +21,14 @@ package org.apache.causeway.viewer.graphql.model.marshallers;
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
+import graphql.Scalars;
+
 import org.springframework.stereotype.Component;
 
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import graphql.Scalars;
-
 
 /**
  * Acts as a fallback.  We put it last in the list
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortPrimitive.java
index 010933db7c..2763d06d4b 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortPrimitive.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortWrapper.java
index 197f4c0bbf..20393403d4 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerShortWrapper.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerString.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerString.java
index 8081b04c6c..00debcec64 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerString.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerString.java
@@ -18,19 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import graphql.Scalars;
 
-import org.apache.causeway.core.config.CausewayConfiguration;
+import org.springframework.stereotype.Component;
 
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.core.config.CausewayConfiguration;
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidPrimitive.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidPrimitive.java
index c99b483df8..af64c15707 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidPrimitive.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidPrimitive.java
@@ -18,18 +18,17 @@
  */
 package org.apache.causeway.viewer.graphql.model.marshallers;
 
-import graphql.Scalars;
-
 import javax.annotation.Priority;
 import javax.inject.Inject;
 
+import graphql.Scalars;
+
+import org.springframework.stereotype.Component;
+
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
-
 import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
-import org.springframework.stereotype.Component;
-
 
 @Component
 @Priority(PriorityPrecedence.LATE)
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidWrapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidWrapper.java
index 296cfc506d..ff9590ab84 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidWrapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/marshallers/ScalarMarshallerVoidWrapper.java
@@ -23,12 +23,11 @@ import javax.inject.Inject;
 
 import graphql.Scalars;
 
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
-
 import org.springframework.stereotype.Component;
 
 import org.apache.causeway.applib.annotation.PriorityPrecedence;
 import org.apache.causeway.core.config.CausewayConfiguration;
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshallerAbstract;
 
 
 @Component
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/registry/GraphQLTypeRegistry.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/registry/GraphQLTypeRegistry.java
index 61c1d6047e..6028b78033 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/registry/GraphQLTypeRegistry.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/registry/GraphQLTypeRegistry.java
@@ -25,26 +25,26 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import javax.inject.Inject;
+import javax.inject.Provider;
+
 import graphql.schema.GraphQLEnumType;
 import graphql.schema.GraphQLInputObjectType;
 import graphql.schema.GraphQLNamedType;
 import graphql.schema.GraphQLObjectType;
 import graphql.schema.GraphQLType;
 
-import org.apache.causeway.viewer.graphql.model.context.Context;
-import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+import static graphql.schema.GraphQLEnumType.newEnum;
+import static graphql.schema.GraphQLEnumValueDefinition.newEnumValueDefinition;
 
 import org.springframework.stereotype.Component;
 
+import org.apache.causeway.viewer.graphql.model.context.Context;
+import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
+
 import lombok.RequiredArgsConstructor;
-import lombok.extern.log4j.Log4j2;
 import lombok.val;
-
-import javax.inject.Inject;
-import javax.inject.Provider;
-
-import static graphql.schema.GraphQLEnumType.newEnum;
-import static graphql.schema.GraphQLEnumValueDefinition.newEnumValueDefinition;
+import lombok.extern.log4j.Log4j2;
 
 @Component
 @RequiredArgsConstructor(onConstructor_ = {@Inject})
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
index 20a692f50f..45c75039ae 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelMutation.java
@@ -3,6 +3,9 @@ package org.apache.causeway.viewer.graphql.model.toplevel;
 import java.util.ArrayList;
 import java.util.List;
 
+import graphql.schema.DataFetchingEnvironment;
+import graphql.schema.GraphQLObjectType;
+
 import org.apache.causeway.core.metamodel.facets.properties.update.modify.PropertySetterFacet;
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
 import org.apache.causeway.core.metamodel.spec.feature.MixedIn;
@@ -14,8 +17,6 @@ import org.apache.causeway.viewer.graphql.model.domain.GqlvMutationForAction;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvMutationForProperty;
 import org.apache.causeway.viewer.graphql.model.domain.Parent;
 
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLObjectType;
 import lombok.val;
 
 public class GqlvTopLevelMutation
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
index b0baf4d332..0dee8a582a 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/toplevel/GqlvTopLevelQuery.java
@@ -6,8 +6,6 @@ import java.util.List;
 import graphql.schema.DataFetchingEnvironment;
 import graphql.schema.GraphQLObjectType;
 
-import lombok.val;
-
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvAbstractCustom;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvDomainObject;
@@ -15,6 +13,8 @@ import org.apache.causeway.viewer.graphql.model.domain.GqlvDomainService;
 import org.apache.causeway.viewer.graphql.model.domain.GqlvScenario;
 import org.apache.causeway.viewer.graphql.model.domain.Parent;
 
+import lombok.val;
+
 public class GqlvTopLevelQuery
         extends GqlvAbstractCustom
         implements Parent {
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapper.java
index 2487af7f2c..bb7efbcacf 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapper.java
@@ -18,7 +18,7 @@
  */
 package org.apache.causeway.viewer.graphql.model.types;
 
-import graphql.schema.*;
+import graphql.schema.GraphQLScalarType;
 
 /**
  * Internal SPI.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapperUsingScalarMarshallers.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapperUsingScalarMarshallers.java
index f6d6c6739c..06e8f5ce43 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapperUsingScalarMarshallers.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/ScalarMapperUsingScalarMarshallers.java
@@ -18,23 +18,23 @@
  */
 package org.apache.causeway.viewer.graphql.model.types;
 
-import graphql.schema.*;
-
-import lombok.RequiredArgsConstructor;
-
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import javax.inject.Inject;
 
-import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshaller;
+import graphql.schema.GraphQLScalarType;
 
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.stereotype.Component;
 
+import org.apache.causeway.viewer.graphql.applib.marshallers.ScalarMarshaller;
+
+import lombok.RequiredArgsConstructor;
+
 /**
  * Internal (default) implementation of {@link ScalarMapper} that implements the chain-of-responsibility
  * pattern over an injected list of all known {@link ScalarMarshaller} components.
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
index 8a3ae353b1..0f3b29a8b3 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapper.java
@@ -18,6 +18,10 @@
  */
 package org.apache.causeway.viewer.graphql.model.types;
 
+import graphql.schema.GraphQLInputType;
+import graphql.schema.GraphQLList;
+import graphql.schema.GraphQLOutputType;
+
 import org.springframework.lang.Nullable;
 
 import org.apache.causeway.core.metamodel.spec.ObjectSpecification;
@@ -25,10 +29,6 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToManyActionParameter;
 import org.apache.causeway.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.causeway.core.metamodel.spec.feature.OneToOneFeature;
 
-import graphql.schema.GraphQLInputType;
-import graphql.schema.GraphQLList;
-import graphql.schema.GraphQLOutputType;
-
 /**
  * Internal SPI to map framework's own datatypes to GraphQL's types.
  *
diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapperDefault.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapperDefault.java
index 6b4392a33a..780d4c641f 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapperDefault.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/types/TypeMapperDefault.java
@@ -18,12 +18,18 @@
  */
 package org.apache.causeway.viewer.graphql.model.types;
 
-import static graphql.schema.GraphQLNonNull.nonNull;
-import static graphql.schema.GraphQLTypeReference.typeRef;
-
 import javax.inject.Inject;
 import javax.inject.Provider;
 
+import graphql.Scalars;
+import graphql.schema.GraphQLInputType;
+import graphql.schema.GraphQLList;
+import graphql.schema.GraphQLOutputType;
+import graphql.schema.GraphQLTypeReference;
+
+import static graphql.schema.GraphQLNonNull.nonNull;
+import static graphql.schema.GraphQLTypeReference.typeRef;
+
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -36,11 +42,6 @@ import org.apache.causeway.core.metamodel.spec.feature.OneToOneFeature;
 import org.apache.causeway.viewer.graphql.model.context.Context;
 import org.apache.causeway.viewer.graphql.model.domain.TypeNames;
 
-import graphql.Scalars;
-import graphql.schema.GraphQLInputType;
-import graphql.schema.GraphQLList;
-import graphql.schema.GraphQLOutputType;
-import graphql.schema.GraphQLTypeReference;
 import lombok.RequiredArgsConstructor;
 import lombok.val;
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Admin_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Admin_IntegTest.java
index db6703705e..bc12c60fde 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Admin_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Admin_IntegTest.java
@@ -23,6 +23,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Calculator_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Calculator_IntegTest.java
index bfbd458021..24b72688ab 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Calculator_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Calculator_IntegTest.java
@@ -23,6 +23,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DepartmentMutating_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DepartmentMutating_IntegTest.java
index c083babf58..8e08aa42a1 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DepartmentMutating_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DepartmentMutating_IntegTest.java
@@ -25,6 +25,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.transaction.annotation.Propagation;
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
index a24e276e2f..55e23e5054 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Department_IntegTest.java
@@ -18,18 +18,11 @@
  */
 package org.apache.causeway.viewer.graphql.viewer.test.e2e.queryandmutations;
 
-import java.util.ArrayList;
 import java.util.List;
 
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
-
 import org.approvaltests.Approvals;
 import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
-import org.assertj.core.api.Assertions;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
 
@@ -38,10 +31,9 @@ import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.transaction.annotation.Propagation;
 
-import org.apache.causeway.commons.internal.base._Strings;
-import org.apache.causeway.commons.internal.collections._Maps;
 import org.apache.causeway.viewer.graphql.viewer.test.domain.dept.Department;
 import org.apache.causeway.viewer.graphql.viewer.test.domain.dept.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
 
 import lombok.val;
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.java
index 428f2f1a16..46799d4b15 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHeadMutating_IntegTest.java
@@ -25,6 +25,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.transaction.annotation.Propagation;
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHead_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHead_IntegTest.java
index 360e35f179..8cc2cd5ff3 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHead_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/DeptHead_IntegTest.java
@@ -18,8 +18,6 @@
  */
 package org.apache.causeway.viewer.graphql.viewer.test.e2e.queryandmutations;
 
-import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
-
 import org.approvaltests.Approvals;
 import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
@@ -32,6 +30,7 @@ import org.springframework.test.context.ActiveProfiles;
 import org.springframework.transaction.annotation.Propagation;
 
 import org.apache.causeway.viewer.graphql.viewer.test.domain.dept.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
 
 
 //NOT USING @Transactional since we are running server within same transaction otherwise
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.java
index baa0018cbc..4a594ab762 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/StaffMutating_IntegTest.java
@@ -23,6 +23,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.transaction.annotation.Propagation;
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
index 0dbe1d0d77..f5568939cc 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.java
@@ -25,24 +25,27 @@ import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
 import java.util.Optional;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 import org.approvaltests.Approvals;
 import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.transaction.annotation.Propagation;
 
 import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
 import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
 
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
+
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.viewer.graphql.viewer.test.domain.dept.StaffMember;
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
 
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.val;
 
 
 //NOT USING @Transactional since we are running server within same transaction otherwise
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Calculator_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Calculator_IntegTest.java
index 46a8b4e08c..bb57a593f8 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Calculator_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Calculator_IntegTest.java
@@ -23,6 +23,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.java
index a759e628a2..82d253d988 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/scenario/Department_IntegTest.java
@@ -23,6 +23,7 @@ import org.approvaltests.reporters.DiffReporter;
 import org.approvaltests.reporters.UseReporter;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
+
 import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.causeway.viewer.graphql.viewer.test.e2e.Abstract_IntegTest;
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
index c0b00b221c..275810d940 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/GqlSchemaQuery_print_IntegTest.java
@@ -19,6 +19,7 @@
 package org.apache.causeway.viewer.graphql.viewer.test.schema;
 
 import org.junit.jupiter.api.Order;
+
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.transaction.annotation.Transactional;
 
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
index 1f52b24e61..978fe709d2 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/CausewayModuleViewerGraphqlViewer.java
@@ -18,8 +18,6 @@
  */
 package org.apache.causeway.viewer.graphql.viewer;
 
-import org.apache.causeway.viewer.graphql.viewer.controller.ResourceController;
-
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
 import org.springframework.boot.autoconfigure.graphql.GraphQlCorsProperties;
@@ -34,6 +32,7 @@ import org.springframework.graphql.execution.BatchLoaderRegistry;
 import org.springframework.graphql.execution.DefaultBatchLoaderRegistry;
 
 import org.apache.causeway.viewer.graphql.model.CausewayModuleViewerGraphqlModel;
+import org.apache.causeway.viewer.graphql.viewer.controller.ResourceController;
 
 @Configuration
 @Import({
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/auth/UserMementoProviderDefault.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/auth/UserMementoProviderDefault.java
index d01ea5ebb1..f15c442ace 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/auth/UserMementoProviderDefault.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/auth/UserMementoProviderDefault.java
@@ -20,6 +20,9 @@ package org.apache.causeway.viewer.graphql.viewer.auth;
 
 import javax.inject.Inject;
 
+import graphql.execution.ExecutionContext;
+import graphql.execution.ExecutionStrategyParameters;
+
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -33,9 +36,6 @@ import org.apache.causeway.viewer.graphql.applib.auth.UserMementoProvider;
 import lombok.RequiredArgsConstructor;
 import lombok.val;
 
-import graphql.execution.ExecutionContext;
-import graphql.execution.ExecutionStrategyParameters;
-
 @RequiredArgsConstructor(onConstructor_ = {@Inject})
 public class UserMementoProviderDefault implements UserMementoProvider {
 
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
index 2b388ce3cf..2c596e135f 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/controller/ResourceController.java
@@ -1,9 +1,8 @@
 package org.apache.causeway.viewer.graphql.viewer.controller;
 
-import javax.inject.Inject;
+import java.util.Optional;
 
-import org.apache.causeway.applib.value.Clob;
-import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
+import javax.inject.Inject;
 
 import org.springframework.http.ContentDisposition;
 import org.springframework.http.HttpHeaders;
@@ -18,14 +17,14 @@ import org.springframework.web.bind.annotation.RestController;
 import org.apache.causeway.applib.services.bookmark.Bookmark;
 import org.apache.causeway.applib.services.bookmark.BookmarkService;
 import org.apache.causeway.applib.value.Blob;
+import org.apache.causeway.applib.value.Clob;
 import org.apache.causeway.core.metamodel.object.ManagedObject;
 import org.apache.causeway.core.metamodel.objectmanager.ObjectManager;
+import org.apache.causeway.core.metamodel.spec.feature.OneToOneAssociation;
 
 import lombok.RequiredArgsConstructor;
 import lombok.Value;
 
-import java.util.Optional;
-
 @RestController()
 @RequestMapping("/graphql/object")
 @RequiredArgsConstructor(onConstructor_ = {@Inject})
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
index 730428732a..ab63438dba 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
@@ -20,6 +20,11 @@ package org.apache.causeway.viewer.graphql.viewer.integration;
 
 import java.util.concurrent.CompletableFuture;
 
+import graphql.execution.AsyncExecutionStrategy;
+import graphql.execution.ExecutionContext;
+import graphql.execution.ExecutionStrategyParameters;
+import graphql.execution.FieldValueInfo;
+
 import org.springframework.stereotype.Service;
 
 import org.apache.causeway.applib.services.iactnlayer.InteractionContext;
@@ -28,11 +33,6 @@ import org.apache.causeway.viewer.graphql.applib.auth.UserMementoProvider;
 
 import lombok.val;
 
-import graphql.execution.AsyncExecutionStrategy;
-import graphql.execution.ExecutionContext;
-import graphql.execution.ExecutionStrategyParameters;
-import graphql.execution.FieldValueInfo;
-
 @Service
 public class AsyncExecutionStrategyResolvingWithinInteraction extends AsyncExecutionStrategy {
 
diff --git a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/GraphQlSourceForCauseway.java b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/GraphQlSourceForCauseway.java
index 826958faa2..2404d5f950 100644
--- a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/GraphQlSourceForCauseway.java
+++ b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/GraphQlSourceForCauseway.java
@@ -21,6 +21,10 @@ package org.apache.causeway.viewer.graphql.viewer.integration;
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 
+import graphql.GraphQL;
+import graphql.execution.SimpleDataFetcherExceptionHandler;
+import graphql.schema.GraphQLSchema;
+
 import org.springframework.graphql.execution.GraphQlSource;
 import org.springframework.stereotype.Service;
 
@@ -33,9 +37,6 @@ import org.apache.causeway.viewer.graphql.model.registry.GraphQLTypeRegistry;
 import org.apache.causeway.viewer.graphql.model.toplevel.GqlvTopLevelMutation;
 import org.apache.causeway.viewer.graphql.model.toplevel.GqlvTopLevelQuery;
 
-import graphql.GraphQL;
-import graphql.execution.SimpleDataFetcherExceptionHandler;
-import graphql.schema.GraphQLSchema;
 import lombok.RequiredArgsConstructor;
 import lombok.val;