This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v3
in repository https://gitbox.apache.org/repos/asf/causeway.git


The following commit(s) were added to refs/heads/v3 by this push:
     new 9da3ed6348 Bump Spring Boot 3.2.5 -> 3.3.0
9da3ed6348 is described below

commit 9da3ed634882ae316b7818c14d39f6bdfa6eafd9
Author: Andi Huber <[email protected]>
AuthorDate: Fri May 24 14:48:43 2024 +0200

    Bump Spring Boot 3.2.5 -> 3.3.0
    
    - tiny breaking change since graphql-java 22
---
 bom/pom.xml                                        |  4 +--
 starters/pom.xml                                   |  4 +--
 ...xecutionStrategyResolvingWithinInteraction.java | 29 ++++++++++++++++------
 3 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/bom/pom.xml b/bom/pom.xml
index 6c471d8a98..385d1b0fd5 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -34,7 +34,7 @@ It is therefore a copy of org.apache:apache, with 
customisations clearly identif
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>3.2.5</version>
+        <version>3.3.0</version>
         <relativePath/>
     </parent>
     <groupId>org.apache.causeway</groupId>
@@ -176,7 +176,7 @@ It is therefore a copy of org.apache:apache, with 
customisations clearly identif
 
         <sql-formatter.version>2.0.5</sql-formatter.version>
         <snakeyaml.version>2.0</snakeyaml.version>
-        <spring-boot.version>3.2.5</spring-boot.version>
+        <spring-boot.version>3.3.0</spring-boot.version>
 
         <surefire-plugin.argLine>-Xmx384m</surefire-plugin.argLine>
         <surefire.useModulePath>false</surefire.useModulePath> <!-- disable 
module-path for testing, that is, put everything on the class-path -->
diff --git a/starters/pom.xml b/starters/pom.xml
index fb965005c4..2d9f49496c 100644
--- a/starters/pom.xml
+++ b/starters/pom.xml
@@ -33,7 +33,7 @@
        <parent>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
-               <version>3.2.5</version>
+               <version>3.3.0</version>
                <relativePath />
        </parent>
 
@@ -48,7 +48,7 @@
 
                <maven.compiler.release>17</maven.compiler.release>
 
-               <spring-boot.version>3.2.5</spring-boot.version>
+               <spring-boot.version>3.3.0</spring-boot.version>
                <approvaltests.version>24.1.0</approvaltests.version>
 
                <!-- IMPORTANT: keep in sync with property defined in 
resteasy-spring-boot-starter -->
diff --git 
a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
 
b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
index 8ad334c5b8..b350661fae 100644
--- 
a/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
+++ 
b/viewers/graphql/viewer/src/main/java/org/apache/causeway/viewer/graphql/viewer/integration/AsyncExecutionStrategyResolvingWithinInteraction.java
@@ -20,16 +20,17 @@ package 
org.apache.causeway.viewer.graphql.viewer.integration;
 
 import java.util.concurrent.CompletableFuture;
 
+import graphql.execution.AsyncExecutionStrategy;
+import graphql.execution.ExecutionContext;
+import graphql.execution.ExecutionStrategyParameters;
+import graphql.execution.FieldValueInfo;
+
 import org.springframework.stereotype.Service;
 
 import org.apache.causeway.applib.services.iactnlayer.InteractionContext;
 import org.apache.causeway.applib.services.iactnlayer.InteractionService;
 import org.apache.causeway.viewer.graphql.applib.auth.UserMementoProvider;
 
-import graphql.execution.AsyncExecutionStrategy;
-import graphql.execution.ExecutionContext;
-import graphql.execution.ExecutionStrategyParameters;
-import graphql.execution.FieldValueInfo;
 import lombok.val;
 
 @Service
@@ -47,7 +48,6 @@ public class AsyncExecutionStrategyResolvingWithinInteraction 
extends AsyncExecu
         this.userMementoProvider = userMementoProvider;
     }
 
-
     @Override
     protected CompletableFuture<FieldValueInfo> resolveFieldWithInfo(
             final ExecutionContext executionContext,
@@ -58,12 +58,27 @@ public class 
AsyncExecutionStrategyResolvingWithinInteraction extends AsyncExecu
         if (userMemento != null) {
             return interactionService.call(
                     InteractionContext.builder().user(userMemento).build(),
-                    () -> super.resolveFieldWithInfo(executionContext, 
parameters)
+                    () -> resolveFieldWithInfo2(executionContext, parameters)
             );
         } else {
             return interactionService.callAnonymous(
-                    () -> super.resolveFieldWithInfo(executionContext, 
parameters)
+                    () -> resolveFieldWithInfo2(executionContext, parameters)
             );
         }
     }
+
+    /**
+     * Adapts the super type result into a {@code 
CompletableFuture<FieldValueInfo> }
+     * <p>
+     * super.resolveFieldWithInfo(..) return type changed to {@link Object} 
with graphql-java 22.0
+     */
+    protected CompletableFuture<FieldValueInfo> resolveFieldWithInfo2(
+            final ExecutionContext executionContext,
+            final ExecutionStrategyParameters parameters) {
+        var obj = super.resolveFieldWithInfo(executionContext, parameters);
+        return obj instanceof FieldValueInfo
+                ? CompletableFuture.completedFuture((FieldValueInfo)obj)
+                : (CompletableFuture<FieldValueInfo>)obj;
+    }
+
 }

Reply via email to