-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ability to stream entities #1392
Comments
I think the deprecation is just for files. It's still supporting a pure streaming interface. You should look at the code a bit more in depth and see what's missing? Generally I don't see why we wouldn't want this, so I'll leave this open. |
Hello. I guess, now
|
@dblock @lfidnl I've managed to stream JSON by polishing a bit on the
Basically I overwritten the default Let me know if you have any other suggestion or how can I improve it so I can wrap it all up and submit a PR. |
@raulpopadineti one question: is it works now with deprecation warning, or not? |
@lfidnl it works with deprecation warning. |
@raulpopadineti good, I think, @dblock should approve my suggestion (or change it) and anyone can create PR for fix this issue :) |
I think what you suggest is sensible, would like to see a PR. |
@dblock to which solution are you referring? |
I meant what @lfidnl says. But you're all looking at code, I suggest trying something and PRing it. |
For those interested that may use JSON API, i have took the ideas here and built a basic gem https://github.com/Cabbit/grape_json_api_streamer for grape that i'll expand upon as my projects get more complex. |
@cabbit contribute that to http://www.ruby-grape.org/projects/ pls. |
fixed in the referenced PR |
Hi,
We'd like to build an API that is able to paginate entities and send them in chunks.
A really raw way of sending data in chunks would be:
With this approach I get the deprecation warning:
[DEPRECATION] Argument as FileStreamer-like object is deprecated. Use path to file instead.
because Grape assumes the response is a file.
Will you support streaming of a
Grape::Entity
or any other non-file objects in the future?The text was updated successfully, but these errors were encountered: