Class NodeParentTree<T extends Node>

java.lang.Object
graphql.language.NodeParentTree<T>

@PublicApi public class NodeParentTree<T extends Node> extends Object
This represents a hierarchy from a graphql language node upwards to its associated parent nodes. For example a Directive can be on a InputValueDefinition which can be on a Argument, which can be on a FieldDefinition which may be on an ObjectTypeDefinition.
  • Constructor Details

    • NodeParentTree

      public NodeParentTree(Deque<T> nodeStack)
  • Method Details

    • getNode

      public T getNode()
      Returns the node represented by this info
      Returns:
      the node in play
    • getParentInfo

      public Optional<NodeParentTree<T>> getParentInfo()
      Returns:
      a node MAY have an optional parent
    • getPath

      public List<String> getPath()
      Returns:
      a path of names for nodes thar are NamedNodes
    • toList

      public List<T> toList()
      Returns:
      the tree as a list of T
    • toString

      public String toString()
      Overrides:
      toString in class Object