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 <[email protected]> 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));
