Skip to content

Commit 2322c25

Browse files
committed
Pass request to cacheResponse method.
1 parent c52e45b commit 2322c25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/ErrorQueryResponseWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ErrorQueryResponseWriter implements QueryResponseWriter {
2222
public void write(HttpServletRequest request, HttpServletResponse response, GraphQLResponseCache responseCache) throws IOException {
2323
if (responseCache != null) {
2424
try {
25-
responseCache.cacheResponse(invocationInput, CachedResponse.ofError(statusCode, message));
25+
responseCache.cacheResponse(request, invocationInput, CachedResponse.ofError(statusCode, message));
2626
} catch (Throwable t) {
2727
log.warn(t.getMessage(), t);
2828
log.warn("Ignore read from cache, unexpected error happened");

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/SingleQueryResponseWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void write(HttpServletRequest request, HttpServletResponse response, Grap
3131

3232
if (responseCache != null) {
3333
try {
34-
responseCache.cacheResponse(invocationInput, CachedResponse.ofContent(contentBytes));
34+
responseCache.cacheResponse(request, invocationInput, CachedResponse.ofContent(contentBytes));
3535
} catch (Throwable t) {
3636
log.warn(t.getMessage(), t);
3737
log.warn("Ignore read from cache, unexpected error happened");

0 commit comments

Comments
 (0)