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 interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLAppliedDirectiveArgumentstatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLAppliedDirectivestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLArgumentstatic interfacestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLEnumTypestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLEnumValueDefinitionstatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLFieldDefinitionstatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLInputObjectFieldstatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLInputObjectTypestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLInterfaceTypestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLObjectTypestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLScalarTypestatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLSchemaElementstatic interfaceAGraphQLSchemaVisitorEnvironmentenvironment specific toGraphQLUnionType -
Method Summary
Modifier and TypeMethodDescriptiondefault GraphQLTypeVisitorThis allows you to turn this smarter visitor into the baseGraphQLTypeVisitorinterfacedefault GraphQLSchemaTraversalControlvisitAppliedDirective(GraphQLAppliedDirective appliedDirective, GraphQLSchemaVisitor.AppliedDirectiveVisitorEnvironment environment) Called when visiting a GraphQLAppliedDirective in the schemadefault GraphQLSchemaTraversalControlvisitAppliedDirectiveArgument(GraphQLAppliedDirectiveArgument appliedDirectiveArgument, GraphQLSchemaVisitor.AppliedDirectiveArgumentVisitorEnvironment environment) Called when visiting aGraphQLAppliedDirectiveArgumentin the schemadefault GraphQLSchemaTraversalControlvisitArgument(GraphQLArgument argument, GraphQLSchemaVisitor.ArgumentVisitorEnvironment environment) Called when visiting aGraphQLArgumentin the schemadefault GraphQLSchemaTraversalControlvisitDirective(GraphQLDirective directive, GraphQLSchemaVisitor.DirectiveVisitorEnvironment environment) Called when visiting aGraphQLArgumentin the schemadefault GraphQLSchemaTraversalControlvisitEnumType(GraphQLEnumType enumType, GraphQLSchemaVisitor.EnumTypeVisitorEnvironment environment) Called when visiting aGraphQLEnumTypein the schemadefault GraphQLSchemaTraversalControlvisitEnumValueDefinition(GraphQLEnumValueDefinition enumValueDefinition, GraphQLSchemaVisitor.EnumValueDefinitionVisitorEnvironment environment) Called when visiting aGraphQLEnumValueDefinitionin the schemadefault GraphQLSchemaTraversalControlvisitFieldDefinition(GraphQLFieldDefinition fieldDefinition, GraphQLSchemaVisitor.FieldDefinitionVisitorEnvironment environment) Called when visiting aGraphQLFieldDefinitionin the schemadefault GraphQLSchemaTraversalControlvisitInputObjectField(GraphQLInputObjectField inputObjectField, GraphQLSchemaVisitor.InputObjectFieldVisitorEnvironment environment) Called when visiting aGraphQLInputObjectFieldin the schemadefault GraphQLSchemaTraversalControlvisitInputObjectType(GraphQLInputObjectType inputObjectType, GraphQLSchemaVisitor.InputObjectTypeVisitorEnvironment environment) Called when visiting aGraphQLInputObjectTypein the schemadefault GraphQLSchemaTraversalControlvisitInterfaceType(GraphQLInterfaceType interfaceType, GraphQLSchemaVisitor.InterfaceTypeVisitorEnvironment environment) Called when visiting aGraphQLInterfaceTypein the schemadefault GraphQLSchemaTraversalControlvisitObjectType(GraphQLObjectType objectType, GraphQLSchemaVisitor.ObjectVisitorEnvironment environment) Called when visiting aGraphQLObjectTypein the schemadefault GraphQLSchemaTraversalControlvisitScalarType(GraphQLScalarType scalarType, GraphQLSchemaVisitor.ScalarTypeVisitorEnvironment environment) Called when visiting aGraphQLScalarTypein the schemadefault GraphQLSchemaTraversalControlvisitSchemaElement(GraphQLSchemaElement schemaElement, GraphQLSchemaVisitor.SchemaElementVisitorEnvironment environment) Called when visiting anyGraphQLSchemaElementin the schema.default GraphQLSchemaTraversalControlvisitUnionType(GraphQLUnionType unionType, GraphQLSchemaVisitor.UnionTypeVisitorEnvironment environment) Called when visiting aGraphQLUnionTypein 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 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
This allows you to turn this smarter visitor into the baseGraphQLTypeVisitorinterface- Returns:
- a type visitor
-