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 GraphQLSchemaTraversalControlchangeNode(T schemaElement)Called to change the current node to the specific nodeGraphQLSchemaTraversalControldeleteNode()Called to delete the current nodeGraphQLCodeRegistry.BuildergetCodeRegistry()This will return a value if the visitation call was viaSchemaTransformerTgetElement()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.GraphQLSchemagetSchema()java.util.List<GraphQLSchemaElement>getUnwrappedLeadingElements()This returns the schema element that led to this element but withGraphQLModifiedTypewrappers removed.GraphQLSchemaTraversalControlinsertAfter(T toInsertAfter)Called to insert the current schema element after the specified schema elementGraphQLSchemaTraversalControlinsertBefore(T toInsertBefore)Called to insert the current schema element before the specified schema elementGraphQLSchemaTraversalControlok()GraphQLSchemaTraversalControlquit()
-
-
-
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 withGraphQLModifiedTypewrappers 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
-
-