diff --git a/src/main/java/graphql/execution/ExecutionStrategy.java b/src/main/java/graphql/execution/ExecutionStrategy.java index f2cccd4072..fc38672547 100644 --- a/src/main/java/graphql/execution/ExecutionStrategy.java +++ b/src/main/java/graphql/execution/ExecutionStrategy.java @@ -651,10 +651,13 @@ private FieldValueInfo completeField(GraphQLFieldDefinition fieldDef, ExecutionC ); FieldValueInfo fieldValueInfo = completeValue(executionContext, newParameters); - - CompletableFuture executionResultFuture = fieldValueInfo.getFieldValueFuture(); ctxCompleteField.onDispatched(); - executionResultFuture.whenComplete(ctxCompleteField::onCompleted); + if (fieldValueInfo.isFutureValue()) { + CompletableFuture executionResultFuture = fieldValueInfo.getFieldValueFuture(); + executionResultFuture.whenComplete(ctxCompleteField::onCompleted); + } else { + ctxCompleteField.onCompleted(fieldValueInfo.getFieldValueObject(), null); + } return fieldValueInfo; }