![JAR search and dependency download from the Maven repository](/logo.png)
graphql.kickstart.spring.error.ErrorHandlerSupplier Maven / Gradle / Ivy
package graphql.kickstart.spring.error;
import graphql.kickstart.execution.error.GraphQLErrorHandler;
import java.util.function.Supplier;
public class ErrorHandlerSupplier implements Supplier {
private GraphQLErrorHandler errorHandler;
public ErrorHandlerSupplier(GraphQLErrorHandler errorHandler) {
this.errorHandler = errorHandler;
}
@Override
public GraphQLErrorHandler get() {
return errorHandler;
}
public boolean isPresent() {
return errorHandler != null;
}
public void setErrorHandler(GraphQLErrorHandler errorHandler) {
this.errorHandler = errorHandler;
}
}