graphql.kickstart.execution.FutureSingleExecutionResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-kickstart-jakarta5 Show documentation
Show all versions of graphql-java-kickstart-jakarta5 Show documentation
relay.js-compatible GraphQL servlet
The newest version!
package graphql.kickstart.execution;
import graphql.ExecutionResult;
import graphql.kickstart.execution.input.GraphQLInvocationInput;
import java.util.concurrent.CompletableFuture;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
class FutureSingleExecutionResult implements FutureExecutionResult {
@Getter
private final GraphQLInvocationInput invocationInput;
private final CompletableFuture single;
@Override
public CompletableFuture thenApplyQueryResult() {
return single.thenApply(GraphQLQueryResult::create);
}
@Override
public void cancel() {
single.cancel(true);
}
}