Package graphql.validation
Class TraversalContext
- java.lang.Object
-
- graphql.validation.TraversalContext
-
- All Implemented Interfaces:
DocumentVisitor
public class TraversalContext extends java.lang.Object implements DocumentVisitor
-
-
Constructor Summary
Constructors Constructor Description TraversalContext(GraphQLSchema graphQLSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enter(Node node, java.util.List<Node> path)
GraphQLArgument
getArgument()
GraphQLDirective
getDirective()
GraphQLFieldDefinition
getFieldDef()
GraphQLInputType
getInputType()
GraphQLOutputType
getOutputType()
GraphQLCompositeType
getParentType()
java.util.List<java.lang.String>
getQueryPath()
void
leave(Node node, java.util.List<Node> ancestors)
-
-
-
Constructor Detail
-
TraversalContext
public TraversalContext(GraphQLSchema graphQLSchema)
-
-
Method Detail
-
enter
public void enter(Node node, java.util.List<Node> path)
- Specified by:
enter
in interfaceDocumentVisitor
-
leave
public void leave(Node node, java.util.List<Node> ancestors)
- Specified by:
leave
in interfaceDocumentVisitor
-
getOutputType
public GraphQLOutputType getOutputType()
- Returns:
- can be null if current node does not have a OutputType associated: for example if the current field is unknown
-
getParentType
public GraphQLCompositeType getParentType()
- Returns:
- can be null if the parent is not a CompositeType
-
getInputType
public GraphQLInputType getInputType()
-
getFieldDef
public GraphQLFieldDefinition getFieldDef()
-
getQueryPath
public java.util.List<java.lang.String> getQueryPath()
-
getDirective
public GraphQLDirective getDirective()
-
getArgument
public GraphQLArgument getArgument()
-
-