Package graphql.schema
Class SchemaTraverser
- java.lang.Object
-
- graphql.schema.SchemaTraverser
-
@PublicApi public class SchemaTraverser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SchemaTraverser()
SchemaTraverser(java.util.function.Function<? super GraphQLSchemaElement,? extends java.util.List<GraphQLSchemaElement>> getChildren)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TraverserResult
depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, GraphQLSchemaElement root)
TraverserResult
depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, java.util.Collection<? extends GraphQLSchemaElement> roots)
TraverserResult
depthFirst(Traverser<GraphQLSchemaElement> traverser, graphql.schema.SchemaTraverser.TraverserDelegateVisitor traverserDelegateVisitor, java.util.Collection<? extends GraphQLSchemaElement> roots)
TraverserResult
depthFirstFullSchema(GraphQLTypeVisitor typeVisitor, GraphQLSchema schema)
This will visit all of the schema elements in the specified schema and invokes the visitor.TraverserResult
depthFirstFullSchema(java.util.List<GraphQLTypeVisitor> typeVisitors, GraphQLSchema schema, java.util.Map<java.lang.Class<?>,java.lang.Object> rootVars)
This will visit all of the schema elements in the specified schema, invoking each visitor in turn.
-
-
-
Constructor Detail
-
SchemaTraverser
public SchemaTraverser(java.util.function.Function<? super GraphQLSchemaElement,? extends java.util.List<GraphQLSchemaElement>> getChildren)
-
SchemaTraverser
public SchemaTraverser()
-
-
Method Detail
-
depthFirstFullSchema
public TraverserResult depthFirstFullSchema(GraphQLTypeVisitor typeVisitor, GraphQLSchema schema)
This will visit all of the schema elements in the specified schema and invokes the visitor.- Parameters:
typeVisitor
- a list of visitors to useschema
- the schema to visit- Returns:
- a traversal result
-
depthFirstFullSchema
public TraverserResult depthFirstFullSchema(java.util.List<GraphQLTypeVisitor> typeVisitors, GraphQLSchema schema, java.util.Map<java.lang.Class<?>,java.lang.Object> rootVars)
This will visit all of the schema elements in the specified schema, invoking each visitor in turn.- Parameters:
typeVisitors
- a list of visitors to useschema
- the schema to visitrootVars
- this sets up variables to be made available to theTraverserContext
. This can be empty but not null- Returns:
- a traversal result
-
depthFirst
public TraverserResult depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, GraphQLSchemaElement root)
-
depthFirst
public TraverserResult depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, java.util.Collection<? extends GraphQLSchemaElement> roots)
-
depthFirst
public TraverserResult depthFirst(Traverser<GraphQLSchemaElement> traverser, graphql.schema.SchemaTraverser.TraverserDelegateVisitor traverserDelegateVisitor, java.util.Collection<? extends GraphQLSchemaElement> roots)
-
-