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

Cache Control headers not set when cacheControl extension is enabled #2918

Closed
blimmer opened this issue Jun 25, 2019 · 2 comments
Closed

Cache Control headers not set when cacheControl extension is enabled #2918

blimmer opened this issue Jun 25, 2019 · 2 comments
Assignees
Labels

Comments

@blimmer
Copy link

blimmer commented Jun 25, 2019

Package Name & Version

The issue is present in apollo-server-express, the latest version (2.6.4).

Latest version where the problem did not occur

I believe this issue was introduced with this commit, where a test was added explicitly for this behavior.

Expected Behavior

When the cacheControl extension is enabled, the server should continue sending Cache-Control HTTP headers.

Actual Behavior

When the cacheControl extension is enabled, the server no longer sends Cache-Control HTTP headers.

Repo demonstrating the problem

https://github.com/blimmer/apollo-server-express-bug-report

@blimmer
Copy link
Author

blimmer commented Jun 25, 2019

This issue is a result my PR attempting to document this behavior (#2880) where @abernix recommended opening an issue.

@glasser
Copy link
Member

glasser commented Oct 20, 2022

The cacheControl option for configuring cache control was removed from Apollo Server in v3 last year. (The feature still exists but is implemented as a standard Apollo Server plugin.)

My memory is that cacheControl: true was a weird backwards-compatible thing that added a GraphQL extension to the response (used by the engineproxy project which was discontinued in 2018) and did not set cache-control headers, so the bug reported here was "working as intended" but not a useful feature, and this legacy support is no longer part of Apollo Server.

@glasser glasser closed this as completed Oct 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants