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

graphql.nadel.ServiceExecutionResult Maven / Gradle / Ivy

There is a newer version: 2021-03-26T09-09-21-fabd441
Show newest version
package graphql.nadel;

import graphql.PublicApi;

import java.util.List;
import java.util.Map;

import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;

@PublicApi
public class ServiceExecutionResult {
    private final List> errors;
    private final Map data;
    private final Map extensions;

    public ServiceExecutionResult(Map data, List> errors, Map extensions) {
        this.data = data;
        this.errors = errors == null ? emptyList() : errors;
        this.extensions = extensions == null ? emptyMap() : extensions;
    }

    public ServiceExecutionResult(Map data, List> errors) {
        this(data, errors, emptyMap());
    }

    public ServiceExecutionResult(Map data) {
        this(data, emptyList(), emptyMap());
    }

    public Map getData() {
        return data;
    }

    public List> getErrors() {
        return errors;
    }

    public Map getExtensions() {
        return extensions;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy