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

graphql.execution.nextgen.result.ObjectExecutionResultNode Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.execution.nextgen.result;

import graphql.GraphQLError;
import graphql.Internal;
import graphql.execution.nextgen.FetchedValueAnalysis;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Internal
public class ObjectExecutionResultNode extends ExecutionResultNode {


    public ObjectExecutionResultNode(FetchedValueAnalysis fetchedValueAnalysis,
                                     List children) {
        this(fetchedValueAnalysis, children, Collections.emptyList());

    }

    public ObjectExecutionResultNode(FetchedValueAnalysis fetchedValueAnalysis,
                                     List children,
                                     List errors) {
        super(fetchedValueAnalysis, ResultNodesUtil.newNullableException(fetchedValueAnalysis, children), children, errors);
    }


    @Override
    public ObjectExecutionResultNode withNewChildren(List children) {
        return new ObjectExecutionResultNode(getFetchedValueAnalysis(), children, getErrors());
    }

    @Override
    public ExecutionResultNode withNewFetchedValueAnalysis(FetchedValueAnalysis fetchedValueAnalysis) {
        return new ObjectExecutionResultNode(fetchedValueAnalysis, getChildren(), getErrors());
    }

    @Override
    public ExecutionResultNode withNewErrors(List errors) {
        return new ObjectExecutionResultNode(getFetchedValueAnalysis(), getChildren(), new ArrayList<>(errors));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy