All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.kickstart.execution.FutureSingleExecutionResult Maven / Gradle / Ivy

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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy