
graphql.ExecutionResultImpl Maven / Gradle / Ivy
package graphql;
import java.util.ArrayList;
import java.util.List;
public class ExecutionResultImpl implements ExecutionResult {
private final List errors = new ArrayList();
private Object data;
public ExecutionResultImpl(List extends GraphQLError> errors) {
this.errors.addAll(errors);
}
public ExecutionResultImpl(Object data, List extends GraphQLError> errors) {
this.data = data;
if (errors != null) {
this.errors.addAll(errors);
}
}
public void addErrors(List extends GraphQLError> errors) {
this.errors.addAll(errors);
}
@Override
public Object getData() {
return data;
}
public void setData(Object result) {
this.data = result;
}
@Override
public List getErrors() {
return new ArrayList(errors);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy