-
Notifications
You must be signed in to change notification settings - Fork 309
Open
Description
Summary
Add a caching extension to provide optional caching capabilities for Graffle.
Context
While Graffle excels as a general-purpose GraphQL client, users building UI applications may benefit from caching capabilities. Currently, we position clients like Apollo and Urql as better fits for UI applications primarily due to their caching features. However, caching could be implemented as a Graffle extension, maintaining our philosophy of keeping the core lean while offering powerful opt-in features.
Potential Approaches
- Simple response cache - Cache responses by query + variables
- Normalized cache - Document-based normalized caching similar to Apollo/Urql
- Adapter pattern - Allow integration with existing cache solutions
Benefits
- Maintain Graffle's simplicity while offering caching as opt-in
- Users could use Graffle for UI applications without switching clients
- Follows our extensibility philosophy (like OpenTelemetry, Upload extensions)
- Could start simple and evolve based on user needs
Considerations
- Cache invalidation strategies
- Memory management
- TypeScript support for cached data
- Performance implications
- Bundle size impact (extension should be tree-shakeable)
Related
This came up during comparison documentation work - currently we direct UI app developers toward Apollo/Urql primarily for caching, but an extension could address this gap while maintaining Graffle's design principles.
Metadata
Metadata
Assignees
Labels
No labels