Skip to content

Commit c477690

Browse files
committed
Compiles but all tests fail
1 parent 105fa45 commit c477690

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/graphql/annotations/strategies/EnhancedExecutionStrategy.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package graphql.annotations.strategies;
1616

1717
import graphql.ExecutionResult;
18+
import graphql.ExecutionResultImpl;
1819
import graphql.execution.*;
1920
import graphql.language.*;
2021
import graphql.schema.GraphQLEnumType;
@@ -30,7 +31,8 @@ public class EnhancedExecutionStrategy extends AsyncSerialExecutionStrategy {
3031
private static final String CLIENT_MUTATION_ID = "clientMutationId";
3132

3233
@Override
33-
protected CompletableFuture<ExecutionResult> resolveField(ExecutionContext executionContext, ExecutionStrategyParameters parameters) {
34+
protected Object /* CompletableFuture<Object> | Object */ resolveField(ExecutionContext executionContext,
35+
ExecutionStrategyParameters parameters) {
3436
GraphQLObjectType parentType = (GraphQLObjectType) parameters.getExecutionStepInfo().getUnwrappedNonNullType();
3537
GraphQLFieldDefinition fieldDef = getFieldDef(executionContext.getGraphQLSchema(), parentType, parameters.getField().getSingleField());
3638
if (fieldDef == null) return null;
@@ -60,8 +62,10 @@ protected CompletableFuture<ExecutionResult> resolveField(ExecutionContext execu
6062
.source(clientMutationId)
6163
.build();
6264

63-
64-
return completeValue(executionContext, newParameters).getFieldValue();
65+
// TODO: The return type of this function changed completely, previously this has only returned
66+
// completeable future, now it might also return the raw object, no clue how this impacts the
67+
// the rest of the annotations framework
68+
return completeValue(executionContext, newParameters).getFieldValueFuture().thenApply(fv -> ExecutionResultImpl.newExecutionResult().data(fv).build());
6569
} else {
6670
return super.resolveField(executionContext, parameters);
6771
}

0 commit comments

Comments
 (0)