Package graphql.schema.visitor
Class GraphQLSchemaVisitorAdapter
java.lang.Object
graphql.schema.GraphQLTypeVisitorStub
graphql.schema.visitor.GraphQLSchemaVisitorAdapter
- All Implemented Interfaces:
GraphQLTypeVisitor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate TraversalControl
visitE
(TraverserContext<GraphQLSchemaElement> context, Supplier<GraphQLSchemaTraversalControl> visitCall) visitGraphQLAppliedDirective
(GraphQLAppliedDirective node, TraverserContext<GraphQLSchemaElement> context) This method will be called when a directive is applied to a schema element.visitGraphQLAppliedDirectiveArgument
(GraphQLAppliedDirectiveArgument node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLArgument
(GraphQLArgument node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLDirective
(GraphQLDirective node, TraverserContext<GraphQLSchemaElement> context) This method will be called twice.visitGraphQLEnumType
(GraphQLEnumType node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLEnumValueDefinition
(GraphQLEnumValueDefinition node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLFieldDefinition
(GraphQLFieldDefinition node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLInputObjectField
(GraphQLInputObjectField node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLInputObjectType
(GraphQLInputObjectType node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLInterfaceType
(GraphQLInterfaceType node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLObjectType
(GraphQLObjectType node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLScalarType
(GraphQLScalarType node, TraverserContext<GraphQLSchemaElement> context) visitGraphQLUnionType
(GraphQLUnionType node, TraverserContext<GraphQLSchemaElement> context) Methods inherited from class graphql.schema.GraphQLTypeVisitorStub
visitGraphQLList, visitGraphQLNonNull, visitGraphQLType, visitGraphQLTypeReference
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface graphql.schema.GraphQLTypeVisitor
changeNode, deleteNode, insertAfter, insertBefore, visitBackRef, visitGraphQLCompositeType, visitGraphQLDirectiveContainer, visitGraphQLFieldsContainer, visitGraphQLInputFieldsContainer, visitGraphQLInputType, visitGraphQLModifiedType, visitGraphQLNullableType, visitGraphQLOutputType, visitGraphQLUnmodifiedType
-
Field Details
-
schemaVisitor
-
-
Constructor Details
-
GraphQLSchemaVisitorAdapter
GraphQLSchemaVisitorAdapter(GraphQLSchemaVisitor schemaVisitor)
-
-
Method Details
-
visitE
private TraversalControl visitE(TraverserContext<GraphQLSchemaElement> context, Supplier<GraphQLSchemaTraversalControl> visitCall) -
visitGraphQLAppliedDirectiveArgument
public TraversalControl visitGraphQLAppliedDirectiveArgument(GraphQLAppliedDirectiveArgument node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLAppliedDirectiveArgument
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLAppliedDirectiveArgument
in classGraphQLTypeVisitorStub
-
visitGraphQLAppliedDirective
public TraversalControl visitGraphQLAppliedDirective(GraphQLAppliedDirective node, TraverserContext<GraphQLSchemaElement> context) Description copied from interface:GraphQLTypeVisitor
This method will be called when a directive is applied to a schema element. TheTraverserContext.getParentNode()
will be the schema element that this is applied to. The graphql-java code base is trying to slowly move away from usingGraphQLDirective
s when they really should beGraphQLAppliedDirective
s- Specified by:
visitGraphQLAppliedDirective
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLAppliedDirective
in classGraphQLTypeVisitorStub
- Parameters:
node
- the applied directivecontext
- the traversal context- Returns:
- how to control the visitation processing
-
visitGraphQLArgument
public TraversalControl visitGraphQLArgument(GraphQLArgument node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLArgument
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLArgument
in classGraphQLTypeVisitorStub
-
visitGraphQLDirective
public TraversalControl visitGraphQLDirective(GraphQLDirective node, TraverserContext<GraphQLSchemaElement> context) Description copied from interface:GraphQLTypeVisitor
This method will be called twice. Once for a directive definition in a schema and then do each time a directive is applied to a schema element When it's applied to a schema element thenTraverserContext.getParentNode()
will be the schema element that this is applied to. The graphql-java code base is trying to slowly move away from usingGraphQLDirective
s when they really should beGraphQLAppliedDirective
s and this is another place that has been left in. In the future this behavior will change and this will only visit directive definitions of a schema, not where they are applied.- Specified by:
visitGraphQLDirective
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLDirective
in classGraphQLTypeVisitorStub
- Parameters:
node
- the directivecontext
- the traversal context- Returns:
- how to control the visitation processing
-
visitGraphQLEnumType
public TraversalControl visitGraphQLEnumType(GraphQLEnumType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLEnumType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLEnumType
in classGraphQLTypeVisitorStub
-
visitGraphQLEnumValueDefinition
public TraversalControl visitGraphQLEnumValueDefinition(GraphQLEnumValueDefinition node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLEnumValueDefinition
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLEnumValueDefinition
in classGraphQLTypeVisitorStub
-
visitGraphQLFieldDefinition
public TraversalControl visitGraphQLFieldDefinition(GraphQLFieldDefinition node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLFieldDefinition
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLFieldDefinition
in classGraphQLTypeVisitorStub
-
visitGraphQLInputObjectField
public TraversalControl visitGraphQLInputObjectField(GraphQLInputObjectField node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInputObjectField
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLInputObjectField
in classGraphQLTypeVisitorStub
-
visitGraphQLInputObjectType
public TraversalControl visitGraphQLInputObjectType(GraphQLInputObjectType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInputObjectType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLInputObjectType
in classGraphQLTypeVisitorStub
-
visitGraphQLInterfaceType
public TraversalControl visitGraphQLInterfaceType(GraphQLInterfaceType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLInterfaceType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLInterfaceType
in classGraphQLTypeVisitorStub
-
visitGraphQLObjectType
public TraversalControl visitGraphQLObjectType(GraphQLObjectType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLObjectType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLObjectType
in classGraphQLTypeVisitorStub
-
visitGraphQLScalarType
public TraversalControl visitGraphQLScalarType(GraphQLScalarType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLScalarType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLScalarType
in classGraphQLTypeVisitorStub
-
visitGraphQLUnionType
public TraversalControl visitGraphQLUnionType(GraphQLUnionType node, TraverserContext<GraphQLSchemaElement> context) - Specified by:
visitGraphQLUnionType
in interfaceGraphQLTypeVisitor
- Overrides:
visitGraphQLUnionType
in classGraphQLTypeVisitorStub
-