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/01/30 09:01:56 UTC
(causeway) 02/04: CAUSEWAY-3676: sketching out introducing mutations (2)
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 07e8fb8c065758b19457d7ea77e6ba1328b1fea3
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jan 30 06:45:43 2024 +0000
CAUSEWAY-3676: sketching out introducing mutations (2)
---
.../integration/GraphQlSourceForCauseway.java | 24 ++++++++--------------
1 file changed, 9 insertions(+), 15 deletions(-)
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 6ae877b43b..84350f0d16 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
@@ -121,16 +121,16 @@ public class GraphQlSourceForCauseway implements GraphQlSource {
objectSpecifications.forEach(objectSpec -> {
switch (objectSpec.getBeanSort()) {
-
case MANAGED_BEAN_CONTRIBUTING: // @DomainService
-
serviceRegistry.lookupBeanById(objectSpec.getLogicalTypeName())
- .ifPresent(servicePojo ->
- {
- topLevelQuery.addDomainServiceTo(objectSpec, servicePojo, context);
-
- });
+ .ifPresent(servicePojo -> topLevelQuery.addDomainServiceTo(objectSpec, servicePojo, context));
break;
+ }
+ });
+ topLevelQuery.buildQueryType();
+
+ objectSpecifications.forEach(objectSpec -> {
+ switch (objectSpec.getBeanSort()) {
case ABSTRACT:
case VIEW_MODEL: // @DomainObject(nature=VIEW_MODEL)
@@ -142,19 +142,13 @@ public class GraphQlSourceForCauseway implements GraphQlSource {
break;
- case MANAGED_BEAN_NOT_CONTRIBUTING: // a @Service or @Component ... ignore
- case MIXIN:
- case VALUE:
- case COLLECTION:
- case VETOED:
- case UNKNOWN:
- break;
}
});
- topLevelQuery.buildQueryType();
if (topLevelMutation != null) {
+ objectSpecifications.forEach(objectSpec -> {
+ });
topLevelMutation.buildMutationType();
topLevelMutation.addFetchers();
}