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
Modifier and TypeMethodDescriptionchangeNode
(T schemaElement) Called to change the current node to the specific nodeCalled to delete the current nodeThis will return a value if the visitation call was viaSchemaTransformer
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.This returns the schema element that led to this element but withGraphQLModifiedType
wrappers removed.insertAfter
(T toInsertAfter) Called to insert the current schema element after the specified schema elementinsertBefore
(T toInsertBefore) Called to insert the current schema element before the specified schema elementok()
quit()
-
Method Details
-
getElement
T getElement()- Returns:
- the element that is being visited
-
getLeadingElements
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
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
- Returns:
- When returned the traversal will continue as planned.
-
quit
- Returns:
- When returned from a
GraphQLSchemaVisitor
's method, indicates exiting the traversal.
-
changeNode
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
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
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
-