Skip to content

Cache key strict mode #117

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

Open
Tracked by #2331
kevincianfarini opened this issue Feb 15, 2023 · 0 comments
Open
Tracked by #2331

Cache key strict mode #117

kevincianfarini opened this issue Feb 15, 2023 · 0 comments

Comments

@kevincianfarini
Copy link

Use case

My project org has a lot of engineers and we interface with many GraphQL schemas (8 to be exact). It's really easy for someone to introduce a silent bug where they start using a new type from one of the 8 schemas without properly introducing a cache key for it.

This has become more manageable since we've started using declarative cache keys, but the problem is still present. We are finding it difficult to scale enforcement of this and our caching has been suffering as a result.

Describe the solution you'd like

A "Cache Key Strict Mode" would be extremely useful to enforce this. It could allow us to enable strict mode for debug builds. That way if we every attempt to read a value from the cache that does not declare a cache key an exception would be thrown and crash the consuming code.

This would potentially make enforcement of cache keys scale more easily and would easily surface issues to engineers.

@martinbonnin martinbonnin changed the title Cache key strict mode Cache key strict mode Sep 13, 2024
@BoD BoD transferred this issue from apollographql/apollo-kotlin Apr 3, 2025
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

No branches or pull requests

1 participant