-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feature request: mung.write
#15
Comments
Why not submit a PR to apollo-server to use |
Good question. From what I can see it's a matter of consistency and possible code reusability within the repo. Apollo-server supports several server side frameworks (express, connect, hapi and so on) - it seems not to rely on framework specific functions like the express-specific |
Thanks for all the extra effort. |
I'm using it in this scenario, but after manipulating the response I'm getting:
I can indeed see the |
Is it possible to show the code (or point to the repo) that manipulates the the response? |
@anodynos Also, could you open a new issue. |
I have a use case for a
mung.writeJson
function which overrides theres.write
function only when the response typeapplication/json
.For example, apollo-server sends graphQL responses via
res.write
, after setting theContent-Type
andContent-Length
headers. You can take a look at the specific source code here. If this happens,mung.json
is never called even though the response is a json object.Thoughts on this? I have a simple working implementation, I have opened a pull request (#14). Let me know what you think 😄
The text was updated successfully, but these errors were encountered: