-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Filter subsequent payloads when parent field is null #3720
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
Filter subsequent payloads when parent field is null #3720
Conversation
✅ Deploy Preview for compassionate-pike-271cb3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Hi @robrichard, I'm @github-actions bot happy to help you with this PR 👋 Supported commandsPlease post this commands in separate comments and only one per comment:
|
|
I don't think this is the approach I would have taken. Instead:
Assuming that the length of paths is negligible, I think this basic approach would scale at O(N*M) where N is the number of errors and M is the number of subsequent payloads, but I'm sure there are clever ways to optimize it better. |
591a71a to
4205d65
Compare
|
@benjie I significantly rewrote this. Now, as discussed in the WG today, I've added the logic to filter subsequent payloads at the point where the bubbled null is ultimately set. This no longer requires inspecting the payload response and should not add any overhead in the non-error case. |
|
Definitely looks better; thanks @robrichard! |
4205d65 to
e0a539c
Compare
Implementing what was discussed in graphql/defer-stream-wg#45