You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 @streamed 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:
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: