Skip to content
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

Afterware for express? #96

Closed
katopz opened this issue Aug 15, 2016 · 2 comments
Closed

Afterware for express? #96

katopz opened this issue Aug 15, 2016 · 2 comments

Comments

@katopz
Copy link

katopz commented Aug 15, 2016

Hi guys,

I'm try to implement 304 response to If-None-Match (by etag) from client.
And I need to calculate etag from response body around here if I understand it right.

So seem like I need an afterware supported there at server side. so the question is

  • Can I expect afterware supported there?
  • Or do I need to PR for afterware?

IMHO etag and last-modified is a must have (you guy aim for speed right?) so it should implement internally and can be turn on and off like express did for static etag do tell me if you want me to PR for 304 response internally instead of afterware approach.

Thanks

@helfer
Copy link
Contributor

helfer commented Aug 19, 2016

@katopz I think it should be possible to do this with normal express middleware, or is that not the case? We do care about performance, but we also care about simplicity. I think implementing this outside of apollo server would cost almost nothing in terms of speed, but it would keep apollo server much simpler.

As a next step, could you figure out what (if anything) we would need to change to support the approach outlined in this stackoverflow answer: http://stackoverflow.com/questions/24542959/how-does-a-etag-work-in-expressjs

@katopz
Copy link
Author

katopz commented Aug 20, 2016

@helfer Cool thanks. I'll close this for now and will keep you post if the result turnout well :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants