Package graphql.schema.visitor
Interface GraphQLSchemaVisitor
This visitor interface offers more "smarts" above
GraphQLTypeVisitor
and aims to be easier to use
with more type safe helpers.
You would use it places that need a GraphQLTypeVisitor
by doing `new GraphQLSchemaVisitor() { ...}.toTypeVisitor()`
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLAppliedDirectiveArgument
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLAppliedDirective
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLArgument
static interface
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLEnumType
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLEnumValueDefinition
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLFieldDefinition
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLInputObjectField
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLInputObjectType
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLInterfaceType
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLObjectType
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLScalarType
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLSchemaElement
static interface
AGraphQLSchemaVisitorEnvironment
environment specific toGraphQLUnionType
-
Method Summary
Modifier and TypeMethodDescriptiondefault GraphQLTypeVisitor
This allows you to turn this smarter visitor into the baseGraphQLTypeVisitor
interfacedefault GraphQLSchemaTraversalControl
visitAppliedDirective
(GraphQLAppliedDirective appliedDirective, GraphQLSchemaVisitor.AppliedDirectiveVisitorEnvironment environment) Called when visiting a GraphQLAppliedDirective in the schemadefault GraphQLSchemaTraversalControl
visitAppliedDirectiveArgument
(GraphQLAppliedDirectiveArgument appliedDirectiveArgument, GraphQLSchemaVisitor.AppliedDirectiveArgumentVisitorEnvironment environment) Called when visiting aGraphQLAppliedDirectiveArgument
in the schemadefault GraphQLSchemaTraversalControl
visitArgument
(GraphQLArgument argument, GraphQLSchemaVisitor.ArgumentVisitorEnvironment environment) Called when visiting aGraphQLArgument
in the schemadefault GraphQLSchemaTraversalControl
visitDirective
(GraphQLDirective directive, GraphQLSchemaVisitor.DirectiveVisitorEnvironment environment) Called when visiting aGraphQLArgument
in the schemadefault GraphQLSchemaTraversalControl
visitEnumType
(GraphQLEnumType enumType, GraphQLSchemaVisitor.EnumTypeVisitorEnvironment environment) Called when visiting aGraphQLEnumType
in the schemadefault GraphQLSchemaTraversalControl
visitEnumValueDefinition
(GraphQLEnumValueDefinition enumValueDefinition, GraphQLSchemaVisitor.EnumValueDefinitionVisitorEnvironment environment) Called when visiting aGraphQLEnumValueDefinition
in the schemadefault GraphQLSchemaTraversalControl
visitFieldDefinition
(GraphQLFieldDefinition fieldDefinition, GraphQLSchemaVisitor.FieldDefinitionVisitorEnvironment environment) Called when visiting aGraphQLFieldDefinition
in the schemadefault GraphQLSchemaTraversalControl
visitInputObjectField
(GraphQLInputObjectField inputObjectField, GraphQLSchemaVisitor.InputObjectFieldVisitorEnvironment environment) Called when visiting aGraphQLInputObjectField
in the schemadefault GraphQLSchemaTraversalControl
visitInputObjectType
(GraphQLInputObjectType inputObjectType, GraphQLSchemaVisitor.InputObjectTypeVisitorEnvironment environment) Called when visiting aGraphQLInputObjectType
in the schemadefault GraphQLSchemaTraversalControl
visitInterfaceType
(GraphQLInterfaceType interfaceType, GraphQLSchemaVisitor.InterfaceTypeVisitorEnvironment environment) Called when visiting aGraphQLInterfaceType
in the schemadefault GraphQLSchemaTraversalControl
visitObjectType
(GraphQLObjectType objectType, GraphQLSchemaVisitor.ObjectVisitorEnvironment environment) Called when visiting aGraphQLObjectType
in the schemadefault GraphQLSchemaTraversalControl
visitScalarType
(GraphQLScalarType scalarType, GraphQLSchemaVisitor.ScalarTypeVisitorEnvironment environment) Called when visiting aGraphQLScalarType
in the schemadefault GraphQLSchemaTraversalControl
visitSchemaElement
(GraphQLSchemaElement schemaElement, GraphQLSchemaVisitor.SchemaElementVisitorEnvironment environment) Called when visiting anyGraphQLSchemaElement
in the schema.default GraphQLSchemaTraversalControl
visitUnionType
(GraphQLUnionType unionType, GraphQLSchemaVisitor.UnionTypeVisitorEnvironment environment) Called when visiting aGraphQLUnionType
in the schema
-
Method Details
-
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 aGraphQLAppliedDirectiveArgument
in 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 aGraphQLArgument
in 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 aGraphQLArgument
in 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 aGraphQLEnumType
in 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 aGraphQLEnumValueDefinition
in 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 aGraphQLFieldDefinition
in 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 aGraphQLInputObjectField
in 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 aGraphQLInputObjectType
in 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 aGraphQLInterfaceType
in 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 aGraphQLObjectType
in 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 aGraphQLScalarType
in 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 aGraphQLUnionType
in 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 anyGraphQLSchemaElement
in 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
This allows you to turn this smarter visitor into the baseGraphQLTypeVisitor
interface- Returns:
- a type visitor
-