graphql.execution.ExecutionPath Maven / Gradle / Ivy
package graphql.execution;
import graphql.Assert;
import graphql.AssertException;
import graphql.PublicApi;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
import static graphql.Assert.assertNotNull;
import static graphql.Assert.assertTrue;
import static java.lang.String.format;
/**
* As a graphql query is executed, each field forms a hierarchical path from parent field to child field and this
* class represents that path as a series of segments.
*/
@PublicApi
public class ExecutionPath {
private static final ExecutionPath ROOT_PATH = new ExecutionPath();
/**
* All paths start from here
*
* @return the root path
*/
public static ExecutionPath rootPath() {
return ROOT_PATH;
}
private final ExecutionPath parent;
private final PathSegment segment;
private final List