-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Issue using chunk with limit #9649
Comments
@smaxwellstewart A better way would be to sort by a field (such as the eg:
|
Ok first off thanks for the response, really appreciated, but I don't view this as a valid solution because:
My use case is by default I want to stream a large response but I also want to be able to specify a limit on that endpoint so I can easily grab the first and last item in a dataset. I could have different responses based off of the presence of a limit field but was trying to minimise complexity. In the end this feature meant we had to change the endpoint to not use streaming anyway, but I still stand by the fact that this is a strange and presumptuous feature of chunking. |
@smaxwellstewart Have you checked my PR #9681? |
@arrilot Great work. Your commit are exactly what I want, really unsure as to why this is soooo intentional. |
I am trying to design an endpoint that has a streamed response for returning large JSON results. I am wanting to add a limit query paramater. But it appears to have no effect when used with
chunk()
For example this doesn't work. The limit simply has no effect:
But this does:
Please any help would be massively appreciated.
The text was updated successfully, but these errors were encountered: