Skip to content

Commit 6c56cbc

Browse files
committed
Update ActionController::Live example for Rack bug
1 parent 6c0c510 commit 6c56cbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

guides/defer/setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ class GraphqlController < ApplicationController
111111

112112
# Check if this is a deferred query:
113113
if (deferred = result.context[:defer])
114+
# Required for Rack 2.2+, see https://github.com/rack/rack/issues/1619
115+
response.headers['Last-Modified'] = Time.now.httpdate
114116
# Use built-in `stream_http_multipart` with Apollo-Client & ActionController::Live
115117
deferred.stream_http_multipart(response)
116118
else

0 commit comments

Comments
 (0)