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
The following commit(s) were added to refs/heads/CAUSEWAY-3676 by this push:
new 6368661bb8 CAUSEWAY-3676: fleshing out GqlvServiceStructure (3)
6368661bb8 is described below
commit 6368661bb8d95c73bf65fadfe6b724615da97ac5
Author: danhaywood <[email protected]>
AuthorDate: Fri Jan 19 17:02:36 2024 +0000
CAUSEWAY-3676: fleshing out GqlvServiceStructure (3)
---
.../viewer/graphql/viewer/source/QueryFieldFactory.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/incubator/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/source/QueryFieldFactory.java
b/incubator/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/source/QueryFieldFactory.java
index 43945ccbe8..283552786b 100644
---
a/incubator/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/source/QueryFieldFactory.java
+++
b/incubator/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/source/QueryFieldFactory.java
@@ -91,11 +91,9 @@ public class QueryFieldFactory {
objectActionList
.forEach(objectAction -> {
- addAction(objectAction, serviceAsGraphQlType);
+ addAction(objectAction, gqlvServiceStructure);
});
- GraphQLObjectType graphQLObjectType =
gqlvServiceStructure.buildObjectGqlType();
-
objectActionList
.forEach(objectAction -> {
addBehaviour(gqlvServiceStructure, objectAction,
codeRegistryBuilder);
@@ -156,7 +154,12 @@ public class QueryFieldFactory {
});
}
- private static void addAction(ObjectAction objectAction,
GraphQLObjectType.Builder serviceAsGraphQlType) {
+ private void addAction(
+ ObjectAction objectAction,
+ GqlvServiceStructure gqlvServiceStructure) {
+
+ val serviceAsGraphQlType =
gqlvServiceStructure.getGraphQlTypeBuilder();
+
String fieldName = objectAction.getId();
GraphQLFieldDefinition.Builder builder = newFieldDefinition()