Fix error: Unusable type signature for overload of graphql.schema.SchemaTraverser::depthFirst #4147 by marktech0813 · Pull Request #4165 · graphql-java/graphql-java

@marktech0813

…emaTraverser::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.

@bbakerman added this to the 26.x milestone

Nov 10, 2025

bbakerman

@alf alf mentioned this pull request

Jan 11, 2026