Skip to content

Commit

Permalink
chore(graphql): bump graphql engine version (datahub-project#9864)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Feb 16, 2024
1 parent cda34b5 commit e4bc915
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ project.ext.externalDependency = [
'elasticSearchRest': 'org.opensearch.client:opensearch-rest-high-level-client:' + elasticsearchVersion,
'elasticSearchJava': 'org.opensearch.client:opensearch-java:2.6.0',
'findbugsAnnotations': 'com.google.code.findbugs:annotations:3.0.1',
'graphqlJava': 'com.graphql-java:graphql-java:19.5',
'graphqlJavaScalars': 'com.graphql-java:graphql-java-extended-scalars:19.1',
'graphqlJava': 'com.graphql-java:graphql-java:21.3',
'graphqlJavaScalars': 'com.graphql-java:graphql-java-extended-scalars:21.0',
'gson': 'com.google.code.gson:gson:2.8.9',
'guice': 'com.google.inject:guice:7.0.0',
'guice4': 'com.google.inject:guice:4.2.3', // Used for frontend while still on old Play version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import graphql.execution.DataFetcherExceptionHandlerResult;
import graphql.execution.ResultPath;
import graphql.language.SourceLocation;
import java.util.concurrent.CompletableFuture;
import lombok.extern.slf4j.Slf4j;

@PublicApi
Expand All @@ -15,7 +16,7 @@ public class DataHubDataFetcherExceptionHandler implements DataFetcherExceptionH
private static final String DEFAULT_ERROR_MESSAGE = "An unknown error occurred.";

@Override
public DataFetcherExceptionHandlerResult onException(
public CompletableFuture<DataFetcherExceptionHandlerResult> handleException(
DataFetcherExceptionHandlerParameters handlerParameters) {
Throwable exception = handlerParameters.getException();
SourceLocation sourceLocation = handlerParameters.getSourceLocation();
Expand Down Expand Up @@ -44,7 +45,8 @@ public DataFetcherExceptionHandlerResult onException(
log.error("Failed to execute", exception);
}
DataHubGraphQLError error = new DataHubGraphQLError(message, path, sourceLocation, errorCode);
return DataFetcherExceptionHandlerResult.newResult().error(error).build();
return CompletableFuture.completedFuture(
DataFetcherExceptionHandlerResult.newResult().error(error).build());
}

<T extends Throwable> T findFirstThrowableCauseOfClass(Throwable throwable, Class<T> clazz) {
Expand Down

0 comments on commit e4bc915

Please sign in to comment.