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

Add support for passing options to http-cache-semantics in apollo-datasource-rest #4203

Closed

Conversation

harleynuss
Copy link

Apollo-datasource-rest uses http-cache-semantics to determine if a response is cachable. I ran into a problem where because of it’s opinionated nature it’s not caching something that I need it to. There are options to change this opinionated behavior, but apollo-datasource-rest isn’t set up in a way that those options can be passed. This PR allows the passing of those options.

@apollo-cla
Copy link

@harleynuss: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@@ -1,4 +1,4 @@
declare module 'http-cache-semantics' {
declare namespace CachePolicy {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here would generally be cleaner to just switch to using the DefinitelyTyped definitions for this. However, DefinitelyTyped is implementing the documented API and the existing code is unfortunately using undocumented/internal methods.

@nickhudkins
Copy link

@harleynuss can you bring this up to date with the base branch?

@harleynuss harleynuss force-pushed the cache-semantics-options branch from 16f13af to 0007e8b Compare June 8, 2020 20:52
@harleynuss
Copy link
Author

@harleynuss can you bring this up to date with the base branch?

Done

@harleynuss harleynuss force-pushed the cache-semantics-options branch 2 times, most recently from af0a60e to b545248 Compare June 8, 2020 21:36
@harleynuss harleynuss force-pushed the cache-semantics-options branch from b545248 to 3174462 Compare June 8, 2020 21:55
@abernix abernix closed this Jun 24, 2020
@nickhudkins
Copy link

nickhudkins commented Jun 24, 2020

@abernix any insight into what happened here?

@abernix
Copy link
Member

abernix commented Jun 24, 2020

Unintentional closing! Please stand-by: #4304

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

Successfully merging this pull request may close these issues.

4 participants