Package graphql.schema.visitor
Interface GraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
-
- All Known Subinterfaces:
GraphQLSchemaVisitor.AppliedDirectiveArgumentVisitorEnvironment
,GraphQLSchemaVisitor.AppliedDirectiveVisitorEnvironment
,GraphQLSchemaVisitor.ArgumentVisitorEnvironment
,GraphQLSchemaVisitor.DirectiveVisitorEnvironment
,GraphQLSchemaVisitor.EnumTypeVisitorEnvironment
,GraphQLSchemaVisitor.EnumValueDefinitionVisitorEnvironment
,GraphQLSchemaVisitor.FieldDefinitionVisitorEnvironment
,GraphQLSchemaVisitor.InputObjectFieldVisitorEnvironment
,GraphQLSchemaVisitor.InputObjectTypeVisitorEnvironment
,GraphQLSchemaVisitor.InterfaceTypeVisitorEnvironment
,GraphQLSchemaVisitor.ObjectVisitorEnvironment
,GraphQLSchemaVisitor.ScalarTypeVisitorEnvironment
,GraphQLSchemaVisitor.SchemaElementVisitorEnvironment
,GraphQLSchemaVisitor.UnionTypeVisitorEnvironment
public interface GraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphQLSchemaTraversalControl
changeNode(T schemaElement)
Called to change the current node to the specific nodeGraphQLSchemaTraversalControl
deleteNode()
Called to delete the current nodeGraphQLCodeRegistry.Builder
getCodeRegistry()
This will return a value if the visitation call was viaSchemaTransformer
T
getElement()
java.util.List<GraphQLSchemaElement>
getLeadingElements()
This returns the schema element that led to this element, eg a field is contained in a type which is pointed to be another field say.GraphQLSchema
getSchema()
java.util.List<GraphQLSchemaElement>
getUnwrappedLeadingElements()
This returns the schema element that led to this element but withGraphQLModifiedType
wrappers removed.GraphQLSchemaTraversalControl
insertAfter(T toInsertAfter)
Called to insert the current schema element after the specified schema elementGraphQLSchemaTraversalControl
insertBefore(T toInsertBefore)
Called to insert the current schema element before the specified schema elementGraphQLSchemaTraversalControl
ok()
GraphQLSchemaTraversalControl
quit()
-
-
-
Method Detail
-
getElement
T getElement()
- Returns:
- the element that is being visited
-
getLeadingElements
java.util.List<GraphQLSchemaElement> getLeadingElements()
This returns the schema element that led to this element, eg a field is contained in a type which is pointed to be another field say.- Returns:
- a list of schema elements leading to this current element
-
getUnwrappedLeadingElements
java.util.List<GraphQLSchemaElement> getUnwrappedLeadingElements()
This returns the schema element that led to this element but withGraphQLModifiedType
wrappers removed.- Returns:
- a list of schema elements leading to this current element
-
getSchema
GraphQLSchema getSchema()
- Returns:
- the schema that is being visited upon
-
getCodeRegistry
GraphQLCodeRegistry.Builder getCodeRegistry()
This will return a value if the visitation call was viaSchemaTransformer
- Returns:
- a code registry builder
-
ok
GraphQLSchemaTraversalControl ok()
- Returns:
- When returned the traversal will continue as planned.
-
quit
GraphQLSchemaTraversalControl quit()
- Returns:
- When returned from a
GraphQLSchemaVisitor
's method, indicates exiting the traversal.
-
changeNode
GraphQLSchemaTraversalControl changeNode(T schemaElement)
Called to change the current node to the specific node- Parameters:
schemaElement
- the schema element to change- Returns:
- a control that changes the current node to a the given node
-
deleteNode
GraphQLSchemaTraversalControl deleteNode()
Called to delete the current node- Returns:
- a control that deletes the current node
-
insertAfter
GraphQLSchemaTraversalControl insertAfter(T toInsertAfter)
Called to insert the current schema element after the specified schema element- Parameters:
toInsertAfter
- the schema element to after before- Returns:
- a control that inserts the given node after the current node
-
insertBefore
GraphQLSchemaTraversalControl insertBefore(T toInsertBefore)
Called to insert the current schema element before the specified schema element- Parameters:
toInsertBefore
- the schema element to insert before- Returns:
- a control that inserts the given node before the current node
-
-