Skip to content

Commit 7232a13

Browse files
authored
Fix error: Unusable type signature for overload of graphql.schema.SchemaTraverser::depthFirst graphql-java#4147
I found the problematic overload in SchemaTraverser and updated its public API to accept the correct visitor type, ensuring it’s usable outside the class. This removes the unusable public signature that referenced the private TraverserDelegateVisitor type. All existing internal calls (which pass new TraverserDelegateVisitor(...)) still work because that class implements TraverserVisitor<GraphQLSchemaElement>. Summary: - Changed SchemaTraverser.depthFirst(Traverser, TraverserDelegateVisitor, ...) to use TraverserVisitor<GraphQLSchemaElement> instead, and adjusted the helper accordingly. - Public API is now usable by callers without referencing a private inner class; no behavior change for existing internal usage.
1 parent 7d77b7a commit 7232a13

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/main/java/graphql/schema/SchemaTraverser.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public TraverserResult depthFirst(final GraphQLTypeVisitor graphQLTypeVisitor, C
8383

8484

8585
public TraverserResult depthFirst(final Traverser<GraphQLSchemaElement> traverser,
86-
final TraverserDelegateVisitor traverserDelegateVisitor,
86+
final TraverserVisitor<GraphQLSchemaElement> traverserVisitor,
8787
Collection<? extends GraphQLSchemaElement> roots) {
88-
return doTraverse(traverser, roots, traverserDelegateVisitor);
88+
return doTraverse(traverser, roots, traverserVisitor);
8989
}
9090

9191
private Traverser<GraphQLSchemaElement> initTraverser() {
@@ -94,8 +94,8 @@ private Traverser<GraphQLSchemaElement> initTraverser() {
9494

9595
private TraverserResult doTraverse(Traverser<GraphQLSchemaElement> traverser,
9696
Collection<? extends GraphQLSchemaElement> roots,
97-
TraverserDelegateVisitor traverserDelegateVisitor) {
98-
return traverser.traverse(roots, traverserDelegateVisitor);
97+
TraverserVisitor<GraphQLSchemaElement> traverserVisitor) {
98+
return traverser.traverse(roots, traverserVisitor);
9999
}
100100

101101
private static class TraverserDelegateVisitor implements TraverserVisitor<GraphQLSchemaElement> {

0 commit comments

Comments
 (0)