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 1294c97fd813cd42ef4c531206a4ca75889c1230 Author: danhaywood <[email protected]> AuthorDate: Wed Jan 24 10:30:10 2024 +0000 CAUSEWAY-3676: adds StaffMember to test collections --- ...ayViewerGraphqlTestModuleIntegTestAbstract.java | 1 + .../viewer/graphql/viewer/test/ScratchPad.java | 81 -- .../domain/{DeptHeadMenu.java => AdminMenu.java} | 36 +- .../graphql/viewer/test/domain/Department.java | 3 +- .../viewer/test/domain/DepartmentRepository.java | 2 - .../{DepartmentMenu.java => Departments.java} | 17 +- .../graphql/viewer/test/domain/DeptHead.java | 6 +- .../viewer/test/domain/DeptHeadRepository.java | 7 + .../domain/{DeptHeadMenu.java => DeptHeads.java} | 10 +- .../domain/{DepartmentMenu.java => Staff.java} | 36 +- .../domain/{Department.java => StaffMember.java} | 37 +- ...tRepository.java => StaffMemberRepository.java} | 20 +- .../viewer/test/domain/UniversityModule.java | 14 +- .../test/e2e/Domain_IntegTest.admin_action._.gql | 2 +- .../Domain_IntegTest.admin_action.approved.json | 2 +- .../e2e/Domain_IntegTest.create_department._.gql | 2 +- ...omain_IntegTest.create_department.approved.json | 2 +- .../Domain_IntegTest.find_all_departments._.gql | 2 +- ...in_IntegTest.find_all_departments.approved.json | 46 +- ...IntegTest.find_department_and_change_name._.gql | 4 +- ...t.find_department_and_change_name.approved.json | 4 +- .../graphql/viewer/test/e2e/Domain_IntegTest.java | 63 +- .../e2e/Domain_IntegTest.other_admin_action._.gql | 2 +- ...main_IntegTest.other_admin_action.approved.json | 2 +- .../test/e2e/Schema_IntegTest.schema.approved.json | 860 +++++++++++++++------ ...chema_IntegTest.schema_types_name.approved.json | 48 +- .../src/test/resources/application-test.properties | 1 + .../graphql/test/src/test/resources/schema.gql | 142 +++- 28 files changed, 959 insertions(+), 493 deletions(-) diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java index c5c9437e74..f07abad316 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/CausewayViewerGraphqlTestModuleIntegTestAbstract.java @@ -36,6 +36,7 @@ import org.apache.causeway.commons.internal.resources._Resources; import org.apache.causeway.core.config.environment.CausewaySystemEnvironment; import org.apache.causeway.core.metamodel.specloader.SpecificationLoader; +import org.apache.causeway.testing.fixtures.applib.CausewayIntegrationTestAbstractWithFixtures; import org.apache.causeway.viewer.graphql.viewer.integration.ExecutionGraphQlServiceForCauseway; import org.apache.causeway.viewer.graphql.viewer.integration.GraphQlSourceForCauseway; diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/ScratchPad.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/ScratchPad.java deleted file mode 100644 index c6bc4489f6..0000000000 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/ScratchPad.java +++ /dev/null @@ -1,81 +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; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import graphql.Scalars; -import graphql.schema.GraphQLFieldDefinition; -import graphql.schema.GraphQLObjectType; -import graphql.schema.GraphQLSchema; -import graphql.schema.GraphQLType; -import graphql.schema.GraphQLTypeReference; - -class ScratchPad { - - static class GQLObjectType { - - GQLObjectType (GraphQLObjectType objectType){ - this.objectType = objectType; - } - - private List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<>(); - - private GraphQLObjectType objectType; - - } - - @Test - @Disabled - public void xxx(){ - - // given - GraphQLObjectType query = getQuery(); - - Set<GraphQLType> objectTypes = new HashSet<>(); - - objectTypes.add(GraphQLObjectType.newObject().name("e1").field(GraphQLFieldDefinition.newFieldDefinition().name("e1").type(GraphQLTypeReference.typeRef("e2")).build()).build()); - objectTypes.add(GraphQLObjectType.newObject().name("e2").field(GraphQLFieldDefinition.newFieldDefinition().name("e2").type(GraphQLTypeReference.typeRef("e1")).build()).build()); - - - GraphQLSchema schema = GraphQLSchema.newSchema() - .query(query) - .additionalTypes(objectTypes) -// .codeRegistry(codeRegistry) - .build(); - Assertions.assertEquals(1, schema.getType("e1").getChildren().size()); - - } - - - private GraphQLObjectType getQuery() { - GraphQLObjectType.Builder queryBuilder = new GraphQLObjectType.Builder().name("query"); - queryBuilder.field(GraphQLFieldDefinition.newFieldDefinition().name("f1").type(Scalars.GraphQLString).build()); - GraphQLObjectType query = queryBuilder.build(); - return query; - } - -} \ No newline at end of file diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/AdminMenu.java similarity index 60% copy from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java copy to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/AdminMenu.java index a0434e76e4..9109a64201 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/AdminMenu.java @@ -18,38 +18,36 @@ */ package org.apache.causeway.viewer.graphql.viewer.test.domain; +import lombok.RequiredArgsConstructor; + import java.util.List; +import javax.annotation.Priority; import javax.inject.Inject; import javax.inject.Named; -import org.springframework.lang.Nullable; +import org.apache.causeway.applib.annotation.*; -import org.apache.causeway.applib.annotation.Action; -import org.apache.causeway.applib.annotation.DomainService; -import org.apache.causeway.applib.annotation.NatureOfService; -import org.apache.causeway.applib.annotation.PriorityPrecedence; -import org.apache.causeway.applib.annotation.SemanticsOf; - -import lombok.RequiredArgsConstructor; +import org.springframework.lang.Nullable; -@Named("university.dept.DeptHeadMenu") +@Named("university.admin.AdminMenu") @DomainService(nature=NatureOfService.VIEW) [email protected](PriorityPrecedence.EARLY) +@Priority(PriorityPrecedence.EARLY) @RequiredArgsConstructor(onConstructor_ = {@Inject}) -public class DeptHeadMenu { +public class AdminMenu { - final DeptHeadRepository deptHeadRepository; - @Action(semantics = SemanticsOf.SAFE) - public List<DeptHead> findAllDeptHeads(){ - return deptHeadRepository.findAll(); + @Action(semantics = SemanticsOf.NON_IDEMPOTENT) + @ActionLayout(hidden = Where.EVERYWHERE) + public void adminAction() { } - @Action(semantics = SemanticsOf.SAFE) - public DeptHead findDeptHeadByName(final String name){ - return deptHeadRepository.findByName(name); - } + @Action(semantics = SemanticsOf.NON_IDEMPOTENT) + public void otherAdminAction() { + } + public String disableOtherAdminAction() { + return "yup, disabled!"; + } } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java index 4e0ca243e3..d8490bacee 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java @@ -25,6 +25,7 @@ import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; +import org.apache.causeway.applib.annotation.Bounding; import org.apache.causeway.applib.annotation.DomainObject; import org.apache.causeway.applib.annotation.Nature; import org.apache.causeway.applib.annotation.Property; @@ -42,7 +43,7 @@ import java.util.Comparator; ) @javax.inject.Named("university.dept.Department") @NoArgsConstructor -@DomainObject(nature = Nature.ENTITY) +@DomainObject(nature = Nature.ENTITY, bounding = Bounding.BOUNDED) public class Department implements Comparable<Department> { public Department(String name, DeptHead deptHead) { diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java index d700795331..0967532c23 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java @@ -34,8 +34,6 @@ public class DepartmentRepository { public Department create(final String name, @Nullable final DeptHead deptHead) { Department department = new Department(name, deptHead); - department.setName(name); - department.setDeptHead(deptHead); repositoryService.persistAndFlush(department); return department; } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Departments.java similarity index 84% copy from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java copy to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Departments.java index 09dbd22060..602b94a103 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Departments.java @@ -37,12 +37,12 @@ import org.apache.causeway.applib.annotation.SemanticsOf; import lombok.RequiredArgsConstructor; -@Named("university.dept.DepartmentMenu") +@Named("university.dept.Departments") @DomainService( nature=NatureOfService.VIEW) @javax.annotation.Priority(PriorityPrecedence.EARLY) @RequiredArgsConstructor(onConstructor_ = {@Inject}) -public class DepartmentMenu { +public class Departments { final DepartmentRepository departmentRepository; @@ -60,17 +60,4 @@ public class DepartmentMenu { } - @Action(semantics = SemanticsOf.NON_IDEMPOTENT) - @ActionLayout(hidden = Where.EVERYWHERE) - public void adminAction() { - } - - - @Action(semantics = SemanticsOf.NON_IDEMPOTENT) - public void otherAdminAction() { - } - public String disableOtherAdminAction() { - return "yup, disabled!"; - } - } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHead.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHead.java index f42f4812e7..7749187e15 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHead.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHead.java @@ -48,7 +48,11 @@ import lombok.Setter; name = "DeptHead" ) @javax.inject.Named("university.dept.DeptHead") -@DomainObject(nature = Nature.ENTITY, bounding = Bounding.BOUNDED) +@DomainObject( + nature = Nature.ENTITY, + autoCompleteRepository = DeptHeadRepository.class, + autoCompleteMethod = "findByNameContaining" +) public class DeptHead implements Comparable<DeptHead> { @Id diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadRepository.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadRepository.java index 7b315f9574..f13fa05e7b 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadRepository.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadRepository.java @@ -55,4 +55,11 @@ public class DeptHeadRepository { orElse(null); } + public DeptHead findByNameContaining(final String name){ + return findAll().stream(). + filter(deptHead -> deptHead.getName().contains(name)). + findFirst(). + orElse(null); + } + } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeads.java similarity index 88% rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeads.java index a0434e76e4..4a957a884f 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeadMenu.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DeptHeads.java @@ -23,8 +23,6 @@ import java.util.List; import javax.inject.Inject; import javax.inject.Named; -import org.springframework.lang.Nullable; - import org.apache.causeway.applib.annotation.Action; import org.apache.causeway.applib.annotation.DomainService; import org.apache.causeway.applib.annotation.NatureOfService; @@ -33,21 +31,21 @@ import org.apache.causeway.applib.annotation.SemanticsOf; import lombok.RequiredArgsConstructor; -@Named("university.dept.DeptHeadMenu") +@Named("university.dept.DeptHeads") @DomainService(nature=NatureOfService.VIEW) @javax.annotation.Priority(PriorityPrecedence.EARLY) @RequiredArgsConstructor(onConstructor_ = {@Inject}) -public class DeptHeadMenu { +public class DeptHeads { final DeptHeadRepository deptHeadRepository; @Action(semantics = SemanticsOf.SAFE) - public List<DeptHead> findAllDeptHeads(){ + public List<DeptHead> findAllHeads(){ return deptHeadRepository.findAll(); } @Action(semantics = SemanticsOf.SAFE) - public DeptHead findDeptHeadByName(final String name){ + public DeptHead findHeadByName(final String name){ return deptHeadRepository.findByName(name); } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Staff.java similarity index 72% rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Staff.java index 09dbd22060..d2de162c70 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentMenu.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Staff.java @@ -23,54 +23,38 @@ import java.util.List; import javax.inject.Inject; import javax.inject.Named; -import org.apache.causeway.applib.annotation.ActionLayout; - -import org.apache.causeway.applib.annotation.Where; - import org.springframework.lang.Nullable; import org.apache.causeway.applib.annotation.Action; +import org.apache.causeway.applib.annotation.ActionLayout; import org.apache.causeway.applib.annotation.DomainService; import org.apache.causeway.applib.annotation.NatureOfService; import org.apache.causeway.applib.annotation.PriorityPrecedence; import org.apache.causeway.applib.annotation.SemanticsOf; +import org.apache.causeway.applib.annotation.Where; import lombok.RequiredArgsConstructor; -@Named("university.dept.DepartmentMenu") +@Named("university.dept.StaffMemberMenu") @DomainService( nature=NatureOfService.VIEW) @javax.annotation.Priority(PriorityPrecedence.EARLY) @RequiredArgsConstructor(onConstructor_ = {@Inject}) -public class DepartmentMenu { +public class Staff { - final DepartmentRepository departmentRepository; + final StaffMemberRepository staffMemberRepository; @Action(semantics = SemanticsOf.NON_IDEMPOTENT) - public Department createDepartment( + public StaffMember createStaffMember( final String name, - @Nullable final DeptHead deptHead + final Department department ){ - return departmentRepository.create(name, deptHead); + return staffMemberRepository.create(name, department); } @Action(semantics = SemanticsOf.SAFE) - public List<Department> findAllDepartments(){ - return departmentRepository.findAll(); - } - - - @Action(semantics = SemanticsOf.NON_IDEMPOTENT) - @ActionLayout(hidden = Where.EVERYWHERE) - public void adminAction() { - } - - - @Action(semantics = SemanticsOf.NON_IDEMPOTENT) - public void otherAdminAction() { - } - public String disableOtherAdminAction() { - return "yup, disabled!"; + public List<StaffMember> findAllStaffMembers(){ + return staffMemberRepository.findAll(); } } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMember.java similarity index 68% copy from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java copy to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMember.java index 4e0ca243e3..65229ae63e 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Department.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMember.java @@ -18,36 +18,31 @@ */ package org.apache.causeway.viewer.graphql.viewer.test.domain; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; - -import org.apache.causeway.applib.annotation.DomainObject; -import org.apache.causeway.applib.annotation.Nature; -import org.apache.causeway.applib.annotation.Property; - import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.util.Comparator; +import javax.persistence.*; + +import org.apache.causeway.applib.annotation.DomainObject; +import org.apache.causeway.applib.annotation.Nature; +import org.apache.causeway.applib.annotation.Property; + @Entity @Table( schema = "public", - name = "Department" + name = "StaffMember" ) [email protected]("university.dept.Department") [email protected]("university.dept.StaffMember") @NoArgsConstructor @DomainObject(nature = Nature.ENTITY) -public class Department implements Comparable<Department> { +public class StaffMember implements Comparable<StaffMember> { - public Department(String name, DeptHead deptHead) { + public StaffMember(String name, Department department) { this.name = name; - this.deptHead = deptHead; + this.department = department; } @Id @@ -59,12 +54,12 @@ public class Department implements Comparable<Department> { @Getter @Setter @Property - @OneToOne(optional = true) - @JoinColumn(name = "deptHead_id") - private DeptHead deptHead; + @ManyToOne(optional = false) + @JoinColumn(name = "department_id") + private Department department; @Override - public int compareTo(final Department o) { - return Comparator.comparing(Department::getName).compare(this, o); + public int compareTo(final StaffMember o) { + return Comparator.comparing(StaffMember::getName).compare(this, o); } } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMemberRepository.java similarity index 71% copy from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java copy to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMemberRepository.java index d700795331..1eff43776e 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/DepartmentRepository.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/StaffMemberRepository.java @@ -28,27 +28,25 @@ import org.springframework.stereotype.Repository; import org.apache.causeway.applib.services.repository.RepositoryService; @Repository -public class DepartmentRepository { +public class StaffMemberRepository { @Inject private RepositoryService repositoryService; - public Department create(final String name, @Nullable final DeptHead deptHead) { - Department department = new Department(name, deptHead); - department.setName(name); - department.setDeptHead(deptHead); - repositoryService.persistAndFlush(department); - return department; + public StaffMember create(final String name, final Department department) { + StaffMember staffMember = new StaffMember(name, department); + repositoryService.persistAndFlush(staffMember); + return staffMember; } - public List<Department> findAll() { - return repositoryService.allInstances(Department.class); + public List<StaffMember> findAll() { + return repositoryService.allInstances(StaffMember.class); } public void removeAll(){ - repositoryService.removeAll(Department.class); + repositoryService.removeAll(StaffMember.class); } - public Department findByName(final String name){ + public StaffMember findByName(final String name){ return findAll().stream(). filter(dept -> dept.getName().equals(name)). findFirst(). diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/UniversityModule.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/UniversityModule.java index d1e7cf2fb2..00bce680f7 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/UniversityModule.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/UniversityModule.java @@ -18,6 +18,8 @@ */ package org.apache.causeway.viewer.graphql.viewer.test.domain; +import javax.inject.Inject; + import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -30,16 +32,6 @@ import org.apache.causeway.testing.fixtures.applib.modules.ModuleWithFixtures; @ComponentScan @EnableJpaRepositories @EntityScan(basePackageClasses = {UniversityModule.class}) -public class UniversityModule implements ModuleWithFixtures { +public class UniversityModule { - @Override - public FixtureScript getTeardownFixture() { - return new FixtureScript() { - @Override - protected void execute(ExecutionContext executionContext) { - repositoryService.removeAll(Department.class); - repositoryService.removeAll(DeptHead.class); - } - }; - } } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql index 40ad68558a..4870806b0f 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql @@ -1,5 +1,5 @@ { - university_dept_DepartmentMenu { + university_admin_AdminMenu { _gql_mutations { adminAction { hidden diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json index 46f2b6b43c..e062d8879b 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json @@ -1,6 +1,6 @@ { "data" : { - "university_dept_DepartmentMenu" : { + "university_admin_AdminMenu" : { "_gql_mutations" : { "adminAction" : { "hidden" : true diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql index 965e30a4bd..8f641452cf 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql @@ -1,5 +1,5 @@ { - university_dept_DepartmentMenu { + university_dept_Departments { _gql_mutations { createDepartment { hidden diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json index a58e2fece9..ad06004192 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json @@ -1,6 +1,6 @@ { "data" : { - "university_dept_DepartmentMenu" : { + "university_dept_Departments" : { "_gql_mutations" : { "createDepartment" : { "hidden" : false, diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql index 8da9f51895..1ed457642b 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql @@ -1,5 +1,5 @@ { - university_dept_DepartmentMenu { + university_dept_Departments { findAllDepartments { invoke { name { diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json index 066d55db61..3067773e3d 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json @@ -1,22 +1,58 @@ { "data" : { - "university_dept_DepartmentMenu" : { + "university_dept_Departments" : { "findAllDepartments" : { "invoke" : [ { "name" : { - "get" : "foo" + "get" : "Classics" }, "_gql_meta" : { - "id" : "3", + "id" : "67", "logicalTypeName" : "university.dept.Department", "version" : null } }, { "name" : { - "get" : "bar" + "get" : "Physics" }, "_gql_meta" : { - "id" : "4", + "id" : "68", + "logicalTypeName" : "university.dept.Department", + "version" : null + } + }, { + "name" : { + "get" : "Textiles" + }, + "_gql_meta" : { + "id" : "69", + "logicalTypeName" : "university.dept.Department", + "version" : null + } + }, { + "name" : { + "get" : "Pathology" + }, + "_gql_meta" : { + "id" : "70", + "logicalTypeName" : "university.dept.Department", + "version" : null + } + }, { + "name" : { + "get" : "Mathematics" + }, + "_gql_meta" : { + "id" : "71", + "logicalTypeName" : "university.dept.Department", + "version" : null + } + }, { + "name" : { + "get" : "Civil Engineering" + }, + "_gql_meta" : { + "id" : "72", "logicalTypeName" : "university.dept.Department", "version" : null } diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name._.gql index 1b7dfd74c1..9638c9484c 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name._.gql +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name._.gql @@ -1,6 +1,6 @@ { - university_dept_DeptHeadMenu { - findDeptHeadByName { + university_dept_DeptHeads { + findHeadByName { invoke(name: "foo") { _gql_mutations { changeName { diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name.approved.json index 44fcce7d0b..0226001cf9 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name.approved.json @@ -1,7 +1,7 @@ { "data" : { - "university_dept_DeptHeadMenu" : { - "findDeptHeadByName" : { + "university_dept_DeptHeads" : { + "findHeadByName" : { "invoke" : { "_gql_mutations" : { "changeName" : { diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java index fbb2615bca..8ca42fc373 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java @@ -24,11 +24,13 @@ import java.util.List; import javax.inject.Inject; +import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMemberRepository; + import org.approvaltests.Approvals; import org.approvaltests.reporters.DiffReporter; import org.approvaltests.reporters.UseReporter; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; @@ -41,7 +43,7 @@ import org.apache.causeway.viewer.graphql.viewer.test.domain.Department; import org.apache.causeway.viewer.graphql.viewer.test.domain.DepartmentRepository; import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead; import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHeadRepository; -import org.apache.causeway.viewer.graphql.viewer.test.domain.DepartmentMenu; +import org.apache.causeway.viewer.graphql.viewer.test.domain.Departments; import static org.apache.causeway.commons.internal.assertions._Assert.assertEquals; import static org.apache.causeway.commons.internal.assertions._Assert.assertTrue; @@ -53,13 +55,42 @@ public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAb @Inject DepartmentRepository departmentRepository; @Inject DeptHeadRepository deptHeadRepository; - @Inject DepartmentMenu departmentMenu; + @Inject StaffMemberRepository staffMemberRepository; + + @BeforeEach + void beforeEach(){ + transactionService.runTransactional(Propagation.REQUIRED, () -> { + // departments + Department classics = departmentRepository.create("Classics", null); + Department physics = departmentRepository.create("Physics", null); // no head. + Department textiles = departmentRepository.create("Textiles", null); + Department pathology = departmentRepository.create("Pathology", null); + Department mathematics = departmentRepository.create("Mathematics", null); + Department civilEngineering = departmentRepository.create("Civil Engineering", null); + + // heads + deptHeadRepository.create("Dr. Barney Jones", classics); + deptHeadRepository.create("Prof. Dicky Horwich", textiles); + deptHeadRepository.create("Dr. Susan Hopwood", pathology); + deptHeadRepository.create("Dr. Helen Johansen", mathematics); + deptHeadRepository.create("Dr. George Harwood", civilEngineering); + + // staff + staffMemberRepository.create("Letitia Leadbetter", classics); + staffMemberRepository.create("Gerry Jones", classics); + staffMemberRepository.create("Mervin Hughes", physics); + staffMemberRepository.create("John Gaffney", physics); + staffMemberRepository.create("Margaret Randall", physics); + + }); + } @AfterEach void afterEach(){ transactionService.runTransactional(Propagation.REQUIRED, () -> { - departmentRepository.removeAll(); + staffMemberRepository.removeAll(); deptHeadRepository.removeAll(); + departmentRepository.removeAll(); }); } @@ -90,7 +121,15 @@ public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAb @UseReporter(DiffReporter.class) void create_department() throws Exception { + // given + final int numDepartmentsInitially = + transactionService.callTransactional( + Propagation.REQUIRED, + () -> departmentRepository.findAll().size() + ).valueAsNonNullElseFail(); + // when + String newDepartmentName = "newbie"; val response = submit(); // then payload @@ -104,9 +143,19 @@ public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAb ).valueAsNonNullElseFail(); assertThat(allDepartment) - .hasSize(1) - .element(0) - .extracting(Department::getName).isEqualTo("newbie"); + .hasSize(numDepartmentsInitially + 1) + .filteredOn(x -> x.getName().equals(newDepartmentName)) + .extracting(Department::getName) + .first() + .isEqualTo(newDepartmentName); + + final Department newbieDepartment = + transactionService.callTransactional( + Propagation.REQUIRED, + () -> departmentRepository.findByName(newDepartmentName) + ).valueAsNullableElseFail(); + + assertThat(newbieDepartment).isNotNull(); } @Test diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql index 81139b4a7f..bff0e9d806 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql @@ -1,5 +1,5 @@ { - university_dept_DepartmentMenu { + university_admin_AdminMenu { _gql_mutations { otherAdminAction { disabled diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json index 7c44bc3a62..921fa01320 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json @@ -1,6 +1,6 @@ { "data" : { - "university_dept_DepartmentMenu" : { + "university_admin_AdminMenu" : { "_gql_mutations" : { "otherAdminAction" : { "disabled" : "yup, disabled!" diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json index 4ce91fc10a..b11babc82b 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json @@ -82,23 +82,45 @@ "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "university_dept_DepartmentMenu", + "name" : "university_admin_AdminMenu", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu", + "name" : "university_admin_AdminMenu", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "university_dept_DeptHeadMenu", + "name" : "university_dept_Departments", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu", + "name" : "university_dept_Departments", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "university_dept_DeptHeads", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "university_dept_StaffMemberMenu", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu", "ofType" : null }, "isDeprecated" : false, @@ -13773,68 +13795,15 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_Department", - "description" : null, - "fields" : [ { - "name" : "_gql_meta", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_Department__gql_meta", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "deptHead", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_Department__deptHead__property", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "name", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_Department__name__property", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - } ], - "inputFields" : null, - "interfaces" : [ ], - "enumValues" : null, - "possibleTypes" : null - }, { - "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu", + "name" : "university_admin_AdminMenu", "description" : null, "fields" : [ { - "name" : "findAllDepartments", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__findAllDepartments__action", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { "name" : "_gql_mutations", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__gql_mutations", + "name" : "university_admin_AdminMenu__gql_mutations", "ofType" : null }, "isDeprecated" : false, @@ -13846,7 +13815,7 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__adminAction__action", + "name" : "university_admin_AdminMenu__adminAction__action", "description" : null, "fields" : [ { "name" : "hidden", @@ -13888,59 +13857,26 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__createDepartment__action", + "name" : "university_admin_AdminMenu__gql_mutations", "description" : null, "fields" : [ { - "name" : "hidden", + "name" : "adminAction", "description" : null, "args" : [ ], "type" : { - "kind" : "SCALAR", - "name" : "Boolean", + "kind" : "OBJECT", + "name" : "university_admin_AdminMenu__adminAction__action", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "disabled", + "name" : "otherAdminAction", "description" : null, "args" : [ ], - "type" : { - "kind" : "SCALAR", - "name" : "String", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "invoke", - "description" : null, - "args" : [ { - "name" : "name", - "description" : null, - "type" : { - "kind" : "NON_NULL", - "name" : null, - "ofType" : { - "kind" : "SCALAR", - "name" : "String", - "ofType" : null - } - }, - "defaultValue" : null - }, { - "name" : "deptHead", - "description" : null, - "type" : { - "kind" : "INPUT_OBJECT", - "name" : "university_dept_DeptHead__gql_input", - "ofType" : null - }, - "defaultValue" : null - } ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_Department", + "name" : "university_admin_AdminMenu__otherAdminAction__action", "ofType" : null }, "isDeprecated" : false, @@ -13952,7 +13888,7 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__findAllDepartments__action", + "name" : "university_admin_AdminMenu__otherAdminAction__action", "description" : null, "fields" : [ { "name" : "hidden", @@ -13981,13 +13917,9 @@ "description" : null, "args" : [ ], "type" : { - "kind" : "LIST", - "name" : null, - "ofType" : { - "kind" : "OBJECT", - "name" : "university_dept_Department", - "ofType" : null - } + "kind" : "SCALAR", + "name" : "String", + "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null @@ -13998,79 +13930,37 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__gql_mutations", + "name" : "university_dept_Department", "description" : null, "fields" : [ { - "name" : "adminAction", + "name" : "_gql_meta", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__adminAction__action", + "name" : "university_dept_Department__gql_meta", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "createDepartment", + "name" : "deptHead", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__createDepartment__action", + "name" : "university_dept_Department__deptHead__property", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "otherAdminAction", + "name" : "name", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__otherAdminAction__action", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - } ], - "inputFields" : null, - "interfaces" : [ ], - "enumValues" : null, - "possibleTypes" : null - }, { - "kind" : "OBJECT", - "name" : "university_dept_DepartmentMenu__otherAdminAction__action", - "description" : null, - "fields" : [ { - "name" : "hidden", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "SCALAR", - "name" : "Boolean", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "disabled", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "SCALAR", - "name" : "String", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "invoke", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "SCALAR", - "name" : "String", + "name" : "university_dept_Department__name__property", "ofType" : null }, "isDeprecated" : false, @@ -14242,37 +14132,15 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DeptHead", + "name" : "university_dept_Departments", "description" : null, "fields" : [ { - "name" : "_gql_meta", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_DeptHead__gql_meta", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "department", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "OBJECT", - "name" : "university_dept_DeptHead__department__property", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "name", + "name" : "findAllDepartments", "description" : null, "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHead__name__property", + "name" : "university_dept_Departments__findAllDepartments__action", "ofType" : null }, "isDeprecated" : false, @@ -14283,7 +14151,7 @@ "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHead__gql_mutations", + "name" : "university_dept_Departments__gql_mutations", "ofType" : null }, "isDeprecated" : false, @@ -14295,26 +14163,59 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu", + "name" : "university_dept_Departments__createDepartment__action", "description" : null, "fields" : [ { - "name" : "findAllDeptHeads", + "name" : "hidden", "description" : null, "args" : [ ], "type" : { - "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu__findAllDeptHeads__action", + "kind" : "SCALAR", + "name" : "Boolean", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "findDeptHeadByName", + "name" : "disabled", "description" : null, "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "invoke", + "description" : null, + "args" : [ { + "name" : "name", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "deptHead", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "university_dept_DeptHead__gql_input", + "ofType" : null + }, + "defaultValue" : null + } ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu__findDeptHeadByName__action", + "name" : "university_dept_Department", "ofType" : null }, "isDeprecated" : false, @@ -14326,7 +14227,7 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu__findAllDeptHeads__action", + "name" : "university_dept_Departments__findAllDepartments__action", "description" : null, "fields" : [ { "name" : "hidden", @@ -14359,7 +14260,7 @@ "name" : null, "ofType" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHead", + "name" : "university_dept_Department", "ofType" : null } }, @@ -14372,50 +14273,68 @@ "possibleTypes" : null }, { "kind" : "OBJECT", - "name" : "university_dept_DeptHeadMenu__findDeptHeadByName__action", + "name" : "university_dept_Departments__gql_mutations", "description" : null, "fields" : [ { - "name" : "hidden", - "description" : null, - "args" : [ ], - "type" : { - "kind" : "SCALAR", - "name" : "Boolean", - "ofType" : null - }, - "isDeprecated" : false, - "deprecationReason" : null - }, { - "name" : "disabled", + "name" : "createDepartment", "description" : null, "args" : [ ], "type" : { - "kind" : "SCALAR", - "name" : "String", + "kind" : "OBJECT", + "name" : "university_dept_Departments__createDepartment__action", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead", + "description" : null, + "fields" : [ { + "name" : "_gql_meta", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead__gql_meta", "ofType" : null }, "isDeprecated" : false, "deprecationReason" : null }, { - "name" : "invoke", + "name" : "department", "description" : null, - "args" : [ { - "name" : "name", - "description" : null, - "type" : { - "kind" : "NON_NULL", - "name" : null, - "ofType" : { - "kind" : "SCALAR", - "name" : "String", - "ofType" : null - } - }, - "defaultValue" : null - } ], + "args" : [ ], "type" : { "kind" : "OBJECT", - "name" : "university_dept_DeptHead", + "name" : "university_dept_DeptHead__department__property", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead__name__property", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "_gql_mutations", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead__gql_mutations", "ofType" : null }, "isDeprecated" : false, @@ -14722,6 +14641,505 @@ "interfaces" : [ ], "enumValues" : null, "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads", + "description" : null, + "fields" : [ { + "name" : "findAllHeads", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads__findAllHeads__action", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "findHeadByName", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads__findHeadByName__action", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads__findAllHeads__action", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "invoke", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_DeptHeads__findHeadByName__action", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "invoke", + "description" : null, + "args" : [ { + "name" : "name", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_DeptHead", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember", + "description" : null, + "fields" : [ { + "name" : "_gql_meta", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__gql_meta", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "department", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__department__property", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__name__property", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu", + "description" : null, + "fields" : [ { + "name" : "findAllStaffMembers", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__findAllStaffMembers__action", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "_gql_mutations", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__gql_mutations", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__createStaffMember__action", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "invoke", + "description" : null, + "args" : [ { + "name" : "name", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "department", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "university_dept_Department__gql_input", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__findAllStaffMembers__action", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "invoke", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__gql_mutations", + "description" : null, + "fields" : [ { + "name" : "createStaffMember", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_StaffMemberMenu__createStaffMember__action", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__department__property", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "get", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "university_dept_Department", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "university_dept_StaffMember__gql_input", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__gql_meta", + "description" : null, + "fields" : [ { + "name" : "id", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "logicalTypeName", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "version", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "university_dept_StaffMember__name__property", + "description" : null, + "fields" : [ { + "name" : "hidden", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "disabled", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "get", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null } ], "directives" : [ { "name" : "include", diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json index 773f4214ea..cd0f9b72c8 100644 --- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json +++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json @@ -628,19 +628,15 @@ }, { "name" : "org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__qualifiedName__property" }, { - "name" : "university_dept_Department" - }, { - "name" : "university_dept_DepartmentMenu" - }, { - "name" : "university_dept_DepartmentMenu__adminAction__action" + "name" : "university_admin_AdminMenu" }, { - "name" : "university_dept_DepartmentMenu__createDepartment__action" + "name" : "university_admin_AdminMenu__adminAction__action" }, { - "name" : "university_dept_DepartmentMenu__findAllDepartments__action" + "name" : "university_admin_AdminMenu__gql_mutations" }, { - "name" : "university_dept_DepartmentMenu__gql_mutations" + "name" : "university_admin_AdminMenu__otherAdminAction__action" }, { - "name" : "university_dept_DepartmentMenu__otherAdminAction__action" + "name" : "university_dept_Department" }, { "name" : "university_dept_Department__deptHead__property" }, { @@ -650,13 +646,15 @@ }, { "name" : "university_dept_Department__name__property" }, { - "name" : "university_dept_DeptHead" + "name" : "university_dept_Departments" }, { - "name" : "university_dept_DeptHeadMenu" + "name" : "university_dept_Departments__createDepartment__action" }, { - "name" : "university_dept_DeptHeadMenu__findAllDeptHeads__action" + "name" : "university_dept_Departments__findAllDepartments__action" }, { - "name" : "university_dept_DeptHeadMenu__findDeptHeadByName__action" + "name" : "university_dept_Departments__gql_mutations" + }, { + "name" : "university_dept_DeptHead" }, { "name" : "university_dept_DeptHead__changeDepartment__action" }, { @@ -671,6 +669,30 @@ "name" : "university_dept_DeptHead__gql_mutations" }, { "name" : "university_dept_DeptHead__name__property" + }, { + "name" : "university_dept_DeptHeads" + }, { + "name" : "university_dept_DeptHeads__findAllHeads__action" + }, { + "name" : "university_dept_DeptHeads__findHeadByName__action" + }, { + "name" : "university_dept_StaffMember" + }, { + "name" : "university_dept_StaffMemberMenu" + }, { + "name" : "university_dept_StaffMemberMenu__createStaffMember__action" + }, { + "name" : "university_dept_StaffMemberMenu__findAllStaffMembers__action" + }, { + "name" : "university_dept_StaffMemberMenu__gql_mutations" + }, { + "name" : "university_dept_StaffMember__department__property" + }, { + "name" : "university_dept_StaffMember__gql_input" + }, { + "name" : "university_dept_StaffMember__gql_meta" + }, { + "name" : "university_dept_StaffMember__name__property" } ] } } diff --git a/incubator/viewers/graphql/test/src/test/resources/application-test.properties b/incubator/viewers/graphql/test/src/test/resources/application-test.properties index db8e3e05f0..74f02709ab 100644 --- a/incubator/viewers/graphql/test/src/test/resources/application-test.properties +++ b/incubator/viewers/graphql/test/src/test/resources/application-test.properties @@ -1,2 +1,3 @@ #logging.level.org.springframework=DEBUG logging.level.graphql=DEBUG + diff --git a/incubator/viewers/graphql/test/src/test/resources/schema.gql b/incubator/viewers/graphql/test/src/test/resources/schema.gql index ea7334ef6a..1eb3309ced 100644 --- a/incubator/viewers/graphql/test/src/test/resources/schema.gql +++ b/incubator/viewers/graphql/test/src/test/resources/schema.gql @@ -27,8 +27,10 @@ type Query { causeway_conf_ConfigurationMenu: causeway_conf_ConfigurationMenu causeway_security_LogoutMenu: causeway_security_LogoutMenu numServices: Int - university_dept_DepartmentMenu: university_dept_DepartmentMenu - university_dept_DeptHeadMenu: university_dept_DeptHeadMenu + university_admin_AdminMenu: university_admin_AdminMenu + university_dept_Departments: university_dept_Departments + university_dept_DeptHeads: university_dept_DeptHeads + university_dept_StaffMemberMenu: university_dept_StaffMemberMenu } type causeway_applib_DomainObjectList { @@ -1584,45 +1586,31 @@ type org_apache_causeway_testing_fixtures_applib_fixturescripts_FixtureScript__q hidden: Boolean } -type university_dept_Department { - _gql_meta: university_dept_Department__gql_meta - deptHead: university_dept_Department__deptHead__property - name: university_dept_Department__name__property -} - -type university_dept_DepartmentMenu { - _gql_mutations: university_dept_DepartmentMenu__gql_mutations - findAllDepartments: university_dept_DepartmentMenu__findAllDepartments__action +type university_admin_AdminMenu { + _gql_mutations: university_admin_AdminMenu__gql_mutations } -type university_dept_DepartmentMenu__adminAction__action { +type university_admin_AdminMenu__adminAction__action { disabled: String hidden: Boolean invoke: String } -type university_dept_DepartmentMenu__createDepartment__action { - disabled: String - hidden: Boolean - invoke(deptHead: university_dept_DeptHead__gql_input, name: String!): university_dept_Department +type university_admin_AdminMenu__gql_mutations { + adminAction: university_admin_AdminMenu__adminAction__action + otherAdminAction: university_admin_AdminMenu__otherAdminAction__action } -type university_dept_DepartmentMenu__findAllDepartments__action { +type university_admin_AdminMenu__otherAdminAction__action { disabled: String hidden: Boolean - invoke: [university_dept_Department] -} - -type university_dept_DepartmentMenu__gql_mutations { - adminAction: university_dept_DepartmentMenu__adminAction__action - createDepartment: university_dept_DepartmentMenu__createDepartment__action - otherAdminAction: university_dept_DepartmentMenu__otherAdminAction__action + invoke: String } -type university_dept_DepartmentMenu__otherAdminAction__action { - disabled: String - hidden: Boolean - invoke: String +type university_dept_Department { + _gql_meta: university_dept_Department__gql_meta + deptHead: university_dept_Department__deptHead__property + name: university_dept_Department__name__property } type university_dept_Department__deptHead__property { @@ -1643,28 +1631,32 @@ type university_dept_Department__name__property { hidden: Boolean } -type university_dept_DeptHead { - _gql_meta: university_dept_DeptHead__gql_meta - _gql_mutations: university_dept_DeptHead__gql_mutations - department: university_dept_DeptHead__department__property - name: university_dept_DeptHead__name__property -} - -type university_dept_DeptHeadMenu { - findAllDeptHeads: university_dept_DeptHeadMenu__findAllDeptHeads__action - findDeptHeadByName: university_dept_DeptHeadMenu__findDeptHeadByName__action +type university_dept_Departments { + _gql_mutations: university_dept_Departments__gql_mutations + findAllDepartments: university_dept_Departments__findAllDepartments__action } -type university_dept_DeptHeadMenu__findAllDeptHeads__action { +type university_dept_Departments__createDepartment__action { disabled: String hidden: Boolean - invoke: [university_dept_DeptHead] + invoke(deptHead: university_dept_DeptHead__gql_input, name: String!): university_dept_Department } -type university_dept_DeptHeadMenu__findDeptHeadByName__action { +type university_dept_Departments__findAllDepartments__action { disabled: String hidden: Boolean - invoke(name: String!): university_dept_DeptHead + invoke: [university_dept_Department] +} + +type university_dept_Departments__gql_mutations { + createDepartment: university_dept_Departments__createDepartment__action +} + +type university_dept_DeptHead { + _gql_meta: university_dept_DeptHead__gql_meta + _gql_mutations: university_dept_DeptHead__gql_mutations + department: university_dept_DeptHead__department__property + name: university_dept_DeptHead__name__property } type university_dept_DeptHead__changeDepartment__action { @@ -1702,6 +1694,68 @@ type university_dept_DeptHead__name__property { hidden: Boolean } +type university_dept_DeptHeads { + findAllHeads: university_dept_DeptHeads__findAllHeads__action + findHeadByName: university_dept_DeptHeads__findHeadByName__action +} + +type university_dept_DeptHeads__findAllHeads__action { + disabled: String + hidden: Boolean + invoke: [university_dept_DeptHead] +} + +type university_dept_DeptHeads__findHeadByName__action { + disabled: String + hidden: Boolean + invoke(name: String!): university_dept_DeptHead +} + +type university_dept_StaffMember { + _gql_meta: university_dept_StaffMember__gql_meta + department: university_dept_StaffMember__department__property + name: university_dept_StaffMember__name__property +} + +type university_dept_StaffMemberMenu { + _gql_mutations: university_dept_StaffMemberMenu__gql_mutations + findAllStaffMembers: university_dept_StaffMemberMenu__findAllStaffMembers__action +} + +type university_dept_StaffMemberMenu__createStaffMember__action { + disabled: String + hidden: Boolean + invoke(department: university_dept_Department__gql_input!, name: String!): university_dept_StaffMember +} + +type university_dept_StaffMemberMenu__findAllStaffMembers__action { + disabled: String + hidden: Boolean + invoke: [university_dept_StaffMember] +} + +type university_dept_StaffMemberMenu__gql_mutations { + createStaffMember: university_dept_StaffMemberMenu__createStaffMember__action +} + +type university_dept_StaffMember__department__property { + disabled: String + get: university_dept_Department + hidden: Boolean +} + +type university_dept_StaffMember__gql_meta { + id: String! + logicalTypeName: String! + version: String +} + +type university_dept_StaffMember__name__property { + disabled: String + get: String! + hidden: Boolean +} + input causeway_applib_DomainObjectList__gql_input { id: ID! } @@ -1869,3 +1923,7 @@ input university_dept_Department__gql_input { input university_dept_DeptHead__gql_input { id: ID! } + +input university_dept_StaffMember__gql_input { + id: ID! +}
