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

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

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

import graphql.Internal;
import graphql.util.Traverser;
import graphql.util.TraverserVisitor;

import java.util.Collection;

/**
 * @deprecated Jan 2022 - We have decided to deprecate the NextGen engine, and it will be removed in a future release.
 */
@Deprecated
@Internal
public class ResultNodeTraverser {

    private final Traverser traverser;

    private ResultNodeTraverser(Traverser traverser) {
        this.traverser = traverser;
    }

    public static ResultNodeTraverser depthFirst() {
        return new ResultNodeTraverser(Traverser.depthFirst(ExecutionResultNode::getChildren, null, null));
    }

    public void traverse(TraverserVisitor visitor, ExecutionResultNode root) {
        traverser.traverse(root, visitor);
    }

    public void traverse(TraverserVisitor visitor, Collection roots) {
        traverser.traverse(roots, visitor);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy