Package graphql.schema.visitor
Interface GraphQLSchemaVisitor
-
@PublicSpi public interface GraphQLSchemaVisitor
This visitor interface offers more "smarts" aboveGraphQLTypeVisitorand aims to be easier to use with more type safe helpers.You would use it places that need a
GraphQLTypeVisitorby doing `new GraphQLSchemaVisitor() { ...}.toTypeVisitor()`
-
-
Nested Class Summary
-
Method Summary
-
-
-
Method Detail
-
visitAppliedDirective
default GraphQLSchemaTraversalControl visitAppliedDirective(GraphQLAppliedDirective appliedDirective, GraphQLSchemaVisitor.AppliedDirectiveVisitorEnvironment environment)
Called when visiting a GraphQLAppliedDirective in the schema- Parameters:
appliedDirective- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitAppliedDirectiveArgument
default GraphQLSchemaTraversalControl visitAppliedDirectiveArgument(GraphQLAppliedDirectiveArgument appliedDirectiveArgument, GraphQLSchemaVisitor.AppliedDirectiveArgumentVisitorEnvironment environment)
Called when visiting aGraphQLAppliedDirectiveArgumentin the schema- Parameters:
appliedDirectiveArgument- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitArgument
default GraphQLSchemaTraversalControl visitArgument(GraphQLArgument argument, GraphQLSchemaVisitor.ArgumentVisitorEnvironment environment)
Called when visiting aGraphQLArgumentin the schema- Parameters:
argument- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitDirective
default GraphQLSchemaTraversalControl visitDirective(GraphQLDirective directive, GraphQLSchemaVisitor.DirectiveVisitorEnvironment environment)
Called when visiting aGraphQLArgumentin the schema- Parameters:
directive- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitEnumType
default GraphQLSchemaTraversalControl visitEnumType(GraphQLEnumType enumType, GraphQLSchemaVisitor.EnumTypeVisitorEnvironment environment)
Called when visiting aGraphQLEnumTypein the schema- Parameters:
enumType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitEnumValueDefinition
default GraphQLSchemaTraversalControl visitEnumValueDefinition(GraphQLEnumValueDefinition enumValueDefinition, GraphQLSchemaVisitor.EnumValueDefinitionVisitorEnvironment environment)
Called when visiting aGraphQLEnumValueDefinitionin the schema- Parameters:
enumValueDefinition- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitFieldDefinition
default GraphQLSchemaTraversalControl visitFieldDefinition(GraphQLFieldDefinition fieldDefinition, GraphQLSchemaVisitor.FieldDefinitionVisitorEnvironment environment)
Called when visiting aGraphQLFieldDefinitionin the schema- Parameters:
fieldDefinition- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitInputObjectField
default GraphQLSchemaTraversalControl visitInputObjectField(GraphQLInputObjectField inputObjectField, GraphQLSchemaVisitor.InputObjectFieldVisitorEnvironment environment)
Called when visiting aGraphQLInputObjectFieldin the schema- Parameters:
inputObjectField- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitInputObjectType
default GraphQLSchemaTraversalControl visitInputObjectType(GraphQLInputObjectType inputObjectType, GraphQLSchemaVisitor.InputObjectTypeVisitorEnvironment environment)
Called when visiting aGraphQLInputObjectTypein the schema- Parameters:
inputObjectType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitInterfaceType
default GraphQLSchemaTraversalControl visitInterfaceType(GraphQLInterfaceType interfaceType, GraphQLSchemaVisitor.InterfaceTypeVisitorEnvironment environment)
Called when visiting aGraphQLInterfaceTypein the schema- Parameters:
interfaceType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitObjectType
default GraphQLSchemaTraversalControl visitObjectType(GraphQLObjectType objectType, GraphQLSchemaVisitor.ObjectVisitorEnvironment environment)
Called when visiting aGraphQLObjectTypein the schema- Parameters:
objectType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitScalarType
default GraphQLSchemaTraversalControl visitScalarType(GraphQLScalarType scalarType, GraphQLSchemaVisitor.ScalarTypeVisitorEnvironment environment)
Called when visiting aGraphQLScalarTypein the schema- Parameters:
scalarType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitUnionType
default GraphQLSchemaTraversalControl visitUnionType(GraphQLUnionType unionType, GraphQLSchemaVisitor.UnionTypeVisitorEnvironment environment)
Called when visiting aGraphQLUnionTypein the schema- Parameters:
unionType- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
visitSchemaElement
default GraphQLSchemaTraversalControl visitSchemaElement(GraphQLSchemaElement schemaElement, GraphQLSchemaVisitor.SchemaElementVisitorEnvironment environment)
Called when visiting anyGraphQLSchemaElementin the schema. Since every element in the schema is a schema element, this visitor method will be called back for every element in the schema- Parameters:
schemaElement- the schema element being visitedenvironment- the visiting environment- Returns:
- a control value which is typically
GraphQLSchemaVisitorEnvironment.ok()}
-
toTypeVisitor
default GraphQLTypeVisitor toTypeVisitor()
This allows you to turn this smarter visitor into the baseGraphQLTypeVisitorinterface- Returns:
- a type visitor
-
-