Package graphql.schema
Class GraphQLTypeVisitorStub
- java.lang.Object
-
- graphql.schema.GraphQLTypeVisitorStub
-
- All Implemented Interfaces:
GraphQLTypeVisitor
- Direct Known Subclasses:
AppliedDirectiveArgumentsAreValid
,AppliedDirectivesAreValid
,CodeRegistryVisitor
,DefaultValuesAreValid
,GraphQLTypeCollectingVisitor
,GraphQLTypeResolvingVisitor
,InputAndOutputTypesUsedAppropriately
,NoUnbrokenInputCycles
,OneOfInputObjectRules
,TypeAndFieldRule
,TypesImplementInterfaces
@PublicApi public class GraphQLTypeVisitorStub extends java.lang.Object implements GraphQLTypeVisitor
Base implementation ofGraphQLTypeVisitor
for convenience. Overwrite only required methods and/orvisitGraphQLType(GraphQLSchemaElement, TraverserContext)
as default fallback.
-
-
Constructor Summary
Constructors Constructor Description GraphQLTypeVisitorStub()
-
Method Summary
-
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
-
-
-
-
Method Detail
-
visitGraphQLAppliedDirectiveArgument
public TraversalControl visitGraphQLAppliedDirectiveArgument(GraphQLAppliedDirectiveArgument node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLAppliedDirectiveArgument
in interfaceGraphQLTypeVisitor
-
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
- 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
-
visitGraphQLInterfaceType
public TraversalControl visitGraphQLInterfaceType(GraphQLInterfaceType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLInterfaceType
in interfaceGraphQLTypeVisitor
-
visitGraphQLEnumType
public TraversalControl visitGraphQLEnumType(GraphQLEnumType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLEnumType
in interfaceGraphQLTypeVisitor
-
visitGraphQLEnumValueDefinition
public TraversalControl visitGraphQLEnumValueDefinition(GraphQLEnumValueDefinition node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLEnumValueDefinition
in interfaceGraphQLTypeVisitor
-
visitGraphQLFieldDefinition
public TraversalControl visitGraphQLFieldDefinition(GraphQLFieldDefinition node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLFieldDefinition
in interfaceGraphQLTypeVisitor
-
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
- Parameters:
node
- the directivecontext
- the traversal context- Returns:
- how to control the visitation processing
-
visitGraphQLInputObjectField
public TraversalControl visitGraphQLInputObjectField(GraphQLInputObjectField node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLInputObjectField
in interfaceGraphQLTypeVisitor
-
visitGraphQLInputObjectType
public TraversalControl visitGraphQLInputObjectType(GraphQLInputObjectType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLInputObjectType
in interfaceGraphQLTypeVisitor
-
visitGraphQLList
public TraversalControl visitGraphQLList(GraphQLList node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLList
in interfaceGraphQLTypeVisitor
-
visitGraphQLNonNull
public TraversalControl visitGraphQLNonNull(GraphQLNonNull node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLNonNull
in interfaceGraphQLTypeVisitor
-
visitGraphQLObjectType
public TraversalControl visitGraphQLObjectType(GraphQLObjectType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLObjectType
in interfaceGraphQLTypeVisitor
-
visitGraphQLScalarType
public TraversalControl visitGraphQLScalarType(GraphQLScalarType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLScalarType
in interfaceGraphQLTypeVisitor
-
visitGraphQLTypeReference
public TraversalControl visitGraphQLTypeReference(GraphQLTypeReference node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLTypeReference
in interfaceGraphQLTypeVisitor
-
visitGraphQLUnionType
public TraversalControl visitGraphQLUnionType(GraphQLUnionType node, TraverserContext<GraphQLSchemaElement> context)
- Specified by:
visitGraphQLUnionType
in interfaceGraphQLTypeVisitor
-
visitGraphQLType
protected TraversalControl visitGraphQLType(GraphQLSchemaElement node, TraverserContext<GraphQLSchemaElement> context)
-
-