Package graphql.validation
Class TraversalContext
java.lang.Object
graphql.validation.TraversalContext
- All Implemented Interfaces:
DocumentVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GraphQLArgument
private final List
<InputValueWithState> private GraphQLDirective
private final List
<GraphQLFieldDefinition> private final List
<GraphQLInputType> private final List
<GraphQLOutputType> private final List
<GraphQLCompositeType> private final GraphQLSchema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addDefaultValue
(InputValueWithState defaultValue) private void
addFieldDef
(GraphQLFieldDefinition fieldDefinition) private void
addInputType
(GraphQLInputType graphQLInputType) private void
private void
addParentType
(GraphQLCompositeType compositeType) void
private void
private void
enterImpl
(ArrayValue arrayValue) private void
private void
private void
enterImpl
(FragmentDefinition fragmentDefinition) private void
enterImpl
(InlineFragment inlineFragment) private void
enterImpl
(ObjectField objectField) private void
enterImpl
(OperationDefinition operationDefinition) private void
enterImpl
(SelectionSet selectionSet) private void
enterImpl
(VariableDefinition variableDefinition) private void
private GraphQLArgument
find
(List<GraphQLArgument> arguments, String name) private GraphQLFieldDefinition
getFieldDef
(GraphQLSchema schema, GraphQLType parentType, Field field) private GraphQLNullableType
getNullableType
(GraphQLType type) private boolean
private <T> T
lastElement
(List<T> list) void
private void
private <T> T
-
Field Details
-
schema
-
outputTypeStack
-
parentTypeStack
-
inputTypeStack
-
defaultValueStack
-
fieldDefStack
-
nameStack
-
directive
-
argument
-
-
Constructor Details
-
TraversalContext
-
-
Method Details
-
enter
- Specified by:
enter
in interfaceDocumentVisitor
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
find
-
leave
- Specified by:
leave
in interfaceDocumentVisitor
-
enterName
-
leaveName
-
isEmpty
-
getNullableType
-
getOutputType
- Returns:
- can be null if current node does not have a OutputType associated: for example if the current field is unknown
-
addOutputType
-
lastElement
-
pop
-
getParentType
- Returns:
- can be null if the parent is not a CompositeType
-
addParentType
-
getInputType
-
getDefaultValue
-
addInputType
-
addDefaultValue
-
getFieldDef
-
getQueryPath
-
addFieldDef
-
getDirective
-
getArgument
-
getFieldDef
private GraphQLFieldDefinition getFieldDef(GraphQLSchema schema, GraphQLType parentType, Field field)
-