graphql.servlet.internal.ExecutionResultHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-servlet Show documentation
Show all versions of graphql-java-servlet Show documentation
relay.js-compatible GraphQL servlet
package graphql.servlet.internal;
import graphql.ExecutionResult;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
/**
* @author Andrew Potter
*/
public interface ExecutionResultHandler extends BiConsumer {
@Override
default void accept(ExecutionResult executionResult, Boolean hasNext) {
try {
handle(executionResult, hasNext);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
void handle(ExecutionResult result, Boolean hasNext) throws Exception;
}