Package graphql.schema
Class SchemaTraverser
java.lang.Object
graphql.schema.SchemaTraverser
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaTraverser(Function<? super GraphQLSchemaElement, ? extends List<GraphQLSchemaElement>> getChildren) -
Method Summary
Modifier and TypeMethodDescriptiondepthFirst(GraphQLTypeVisitor graphQLTypeVisitor, GraphQLSchemaElement root) depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, Collection<? extends GraphQLSchemaElement> roots) depthFirst(Traverser<GraphQLSchemaElement> traverser, graphql.schema.SchemaTraverser.TraverserDelegateVisitor traverserDelegateVisitor, Collection<? extends GraphQLSchemaElement> roots) depthFirstFullSchema(GraphQLTypeVisitor typeVisitor, GraphQLSchema schema) This will visit all of the schema elements in the specified schema and invokes the visitor.depthFirstFullSchema(List<GraphQLTypeVisitor> typeVisitors, GraphQLSchema schema, Map<Class<?>, Object> rootVars) This will visit all of the schema elements in the specified schema, invoking each visitor in turn.
-
Constructor Details
-
SchemaTraverser
public SchemaTraverser(Function<? super GraphQLSchemaElement, ? extends List<GraphQLSchemaElement>> getChildren) -
SchemaTraverser
public SchemaTraverser()
-
-
Method Details
-
depthFirstFullSchema
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(List<GraphQLTypeVisitor> typeVisitors, GraphQLSchema schema, Map<Class<?>, 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
-
depthFirst
public TraverserResult depthFirst(GraphQLTypeVisitor graphQLTypeVisitor, Collection<? extends GraphQLSchemaElement> roots) -
depthFirst
public TraverserResult depthFirst(Traverser<GraphQLSchemaElement> traverser, graphql.schema.SchemaTraverser.TraverserDelegateVisitor traverserDelegateVisitor, Collection<? extends GraphQLSchemaElement> roots)
-