Is a server required to honor the initialCount
argument on @stream
#104
Replies: 4 comments 3 replies
-
As the client can know whether more items are coming, it seems fine to allow fewer/more elements in the initial payload. Shouldn't be a big difference for the client (just something to know) and allows for more flexibility on the backend - so IMO Option 2: the current text looks fine. |
Beta Was this translation helpful? Give feedback.
-
This to me is not a major developer experience advantage: you still always need to handle a list shorter than the initial count, because the list can always have less than the initial count. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
After discussing at the Feb 2025 primary WG there has been consensus around option 1. The parent post has been updated to reflect this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
At the time of this discussion creation the incremental delivery spec proposal states (emphasis added):
Should servers be required to send at least as many items as the initialCount argument, or is it ok to send fewer items initially?
Option 1 - Update text to
initialCount
argument, it can assume that the list is complete. It would be a breaking change to switch to option 2 as this would break this client assumption.Option 2 - Text remains as-is
Decision
This was discussed at the Feb 2025 primary WG and there was consensus to adopt Option 1. We would not want a product developer to forgo the use of
@stream
or write client side batching to work around a server sending fewer results than expected in the initial result. It is reasonable to allow a server to send more than the specified initialCount if, for example the server has them cached.Beta Was this translation helpful? Give feedback.
All reactions