Package graphql.validation
Class TraversalContext
java.lang.Object
graphql.validation.TraversalContext
- All Implemented Interfaces:
DocumentVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GraphQLArgumentprivate final List<InputValueWithState> private GraphQLDirectiveprivate 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 voidaddDefaultValue(InputValueWithState defaultValue) private voidaddFieldDef(GraphQLFieldDefinition fieldDefinition) private voidaddInputType(GraphQLInputType graphQLInputType) private voidprivate voidaddParentType(GraphQLCompositeType compositeType) voidprivate voidprivate voidenterImpl(ArrayValue arrayValue) private voidprivate voidprivate voidenterImpl(FragmentDefinition fragmentDefinition) private voidenterImpl(InlineFragment inlineFragment) private voidenterImpl(ObjectField objectField) private voidenterImpl(OperationDefinition operationDefinition) private voidenterImpl(SelectionSet selectionSet) private voidenterImpl(VariableDefinition variableDefinition) private voidprivate GraphQLArgumentfind(List<GraphQLArgument> arguments, String name) private GraphQLFieldDefinitiongetFieldDef(GraphQLSchema schema, GraphQLType parentType, Field field) private GraphQLNullableTypegetNullableType(GraphQLType type) private booleanprivate <T> TlastElement(List<T> list) voidprivate voidprivate <T> T
-
Field Details
-
schema
-
outputTypeStack
-
parentTypeStack
-
inputTypeStack
-
defaultValueStack
-
fieldDefStack
-
nameStack
-
directive
-
argument
-
-
Constructor Details
-
TraversalContext
-
-
Method Details
-
enter
- Specified by:
enterin interfaceDocumentVisitor
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
enterImpl
-
find
-
leave
- Specified by:
leavein 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)
-