Skip to content

Conversation

@BoD
Copy link
Collaborator

@BoD BoD commented Oct 18, 2024

Can be used to know if data was received from the cache even though it was stale (can happen when using maxStale).

To make this happen I had to change ApolloStore.readOperation() / readFragment() to allow it to return cache headers (breaking!).

CacheResolver.resolveField() can now also return cache headers (not breaking because it returns Any?).

In this PR also, rename ExpirationCacheResolver to CacheControlCacheResolver, and rename "Expiration" to "Cache control" in the documentation.

Fixes #51

@BoD BoD requested a review from martinbonnin as a code owner October 18, 2024 17:48
@BoD BoD merged commit 2ae0456 into main Oct 29, 2024
2 checks passed
@BoD BoD deleted the is-stale branch October 29, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ApolloResponse.isStale

2 participants