-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring visitorKeys
back
#3250
Bring visitorKeys
back
#3250
Conversation
|
@ardatan Need to think about this one. |
Note: you can return |
Here some examples; Not sure if returning cc @yaacovCR |
Returning false means you no longer visit any of the children, what if you want to visit only some? |
@IvanGoncharov why exactly was it deprecated even in terms of its original rationale of custom ast? in general, for use cases above, it lets you whitelist what you want to visit rather than entering each child node with a visitor function that returns false, the latter being slightly less performant, and sometimes quite more verbose. |
Related: ardatan/graphql-tools#3481 |
we can workaround the above bug secondary to lack of visitorKeys, but it doesn't change that we are doing too much visiting :( we want to be speedy; if visitorKeys is dropped upstream, we will have to re-implement the v15 version -- please keep |
@ardatan That's great, however, I created new PR for a different reason. This situation repeats itself and was the major issue with all your previous PRs. P.S. I applied changes to this PR and merging it, but the above comment stays true for future PRs. |
Another use for the visitorKeys is present in graphql-python/gql to parse the results coming from the backend |
See #3245 (comment)
I checked
Allow edits by maintainers
. So you can make changes on this PR instead of creating a new one by checking out this branch using GitHub CLI. Also you can leave comments here then I can also do the changes you want :)