-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ConnectionFieldTypeVisitor traversal control
Prior to this commit, the `ConnectionFieldTypeVisitor` would return `TraversalControl.ABORT` when a field with a parent Subscription type is encountered. This is done because this visitor should not consider fields under Subscription types as they are not candidates for pagination. This would also completely abort the visiting of all fields under Subscription types, for all other visitors. As a result, this prevents the decoration of data fetchers by the `ContextTypeVisitor` and leads to missing context information (security or observability). This only applies to 21.x GraphQL Java versions, as a bug was hiding this behavior in previous versions. This commit ensures that the `ConnectionFieldTypeVisitor` ignores fields located under Subscription operations but always return `TraversalControl.CONTINUE` to not completely ignore this part of the schema. Fixes gh-861
- Loading branch information
Showing
2 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters