Hi I ran into a build issue with Sling Graphql Core when I use graphql-java 20.0 (the current released version). Even though that release will not be usable in an OSGi container the latest code will have the same issue.
The problem is that Pax together with Graphql-java cannot find the GenericConnection class. This works in 17.4 though. When I use the code in AEM to test graphql I don’t encounter issue with that class. Error: java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: org/apache/sling/graphql/helpers/GenericConnection at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346) at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:870) at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883) … Caused by: java.lang.NoClassDefFoundError: org/apache/sling/graphql/helpers/GenericConnection at graphql.schema.PropertyFetchingImpl.getPropertyValue(PropertyFetchingImpl.java:114) at graphql.schema.PropertyDataFetcherHelper.getPropertyValue(PropertyDataFetcherHelper.java:22) at graphql.schema.PropertyDataFetcher.getImpl(PropertyDataFetcher.java:131) ... Caused by: java.lang.ClassNotFoundException: org.apache.sling.graphql.helpers.GenericConnection not found by graphql-java [209] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597) at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 91 more I am not a Pax expert and so I am stuck here. The failing code can be found in branch: issue/SLING-10900-200 on module sling-org-apache-sling-graphql-core Cheers - Andy