-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support Lazy Enumerators with Stream #4907
Comments
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
@stream
will defer child selections on list items, but all items are enumerated before any child selections are run.A better workflow might be that, when a
@stream
ed list is resolved, there's no call to.each
right away. Instead, and empty list is put in the response, and then each deferral gets the item it needs and resolves its subfields.Here's a script to demonstrate the behavior in question:
`@stream` with lazy enumeration
It should alternate between
yield
andresolve
messages, but instead, it does all theyield
s then all theresolve
s.If the implementation supported lazy enumeration, then you could use
@stream
to break up database requests into smaller chunks using a cursor.The text was updated successfully, but these errors were encountered: