Skip to content

Extensions are not rendered from GraphQLError that originated from CompletableFuture #1018

@thestarmaker

Description

@thestarmaker

Hi there,

I have noticed that if a DataFetcher returns a CompletableFuture, and this CompletableFuture completes exceptionally with GraphQLError as an exception, then the extensions on this GraphQLError are nor rendered to the response.

The reason is that ExecutionStrategy.handleFetchingExcetion() just delegates to

parameters.deferredErrorSupport().onFetchingException(parameters, e);

and it is never checked that the supplied Throwable may implement GraphQLError. This means that the async code can not append any custom extensions to the errors.

This happens in graphql-java 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions