| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| CompletableFuture<Object> executionResultFuture = fieldValueInfo.getFieldValueFuture(); | ||
| ctxCompleteField.onDispatched(); | ||
| executionResultFuture.whenComplete(ctxCompleteField::onCompleted); | ||
| if (fieldValueInfo.isFutureValue()) { |
There was a problem hiding this comment.
I could've done this as well but it has the unchecked cast already handled internally by FieldValueInfo
Object executionResult = fieldValueInfo.getFieldValueObject();
ctxCompleteField.onDispatched();
if (executionResult instanceof CompletableFuture) {
@SuppressWarnings("unchecked")
CompletableFuture<Object> executionResultFuture = (CompletableFuture<Object>) executionResult;
executionResultFuture.whenComplete(ctxCompleteField::onCompleted);
} else {
ctxCompleteField.onCompleted(executionResult, null);
}
Sorry, something went wrong.
There was a problem hiding this comment.
Nice catch - I am embarrassed I missed this in the great "materialised migration" effort
Sorry, something went wrong.
|
all good! thank you, now I am curious the memory and CPU improvement this change will bring |
Sorry, something went wrong.
|
@bbakerman I wonder if this can be cherry picked to version 22.x ? I can prepare the PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
While updating graphql-kotlin to graphql-java 23 found that completeField is still wrapping FieldValueInfo.fieldValueObject in a CompletableFuture for objects already materialized / in memory
this might be considered a follow up of the Completable Future wrapping change set that came in graphql-java 22
https://github.com/graphql-java/graphql-java/releases/tag/v22.0
I don't think this is a breaking change.