Search packages, repositories and app categories

Package detailsv0.10.1

ferry_cache

A normalized, strongly typed, optimistic cache for GraphQL Operations and Fragments

AndroidiOSWebmacOSWindowsLinux
30-day downloads
71.1K
Likes
4
Pub points
140

Install package

flutter pub add ferry_cache

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Ferry Cache is a normalized, strongly typed, and optimistic caching solution designed specifically for GraphQL operations and fragments. It ensures efficient data management by storing responses in a structured, deduplicated format, reducing redundant network requests. The cache supports real-time updates and optimistic UI behavior, improving user experience during mutations. Built for the GQL Dart ecosystem, it integrates seamlessly with Ferry, enabling robust client-side state handling across multiple platforms.

Use cases

  • Caching GraphQL query results
  • Optimistic UI updates after mutations
  • Managing normalized data across components
  • Reducing redundant network calls
  • Supporting offline-first applications
  • Synchronizing state across different parts of an app

Key features

  • Normalized data storage
  • Strong typing for cache entries
  • Optimistic updates
  • GraphQL fragment support
  • Cross-platform compatibility
  • Integration with Ferry

Suitable for

  • Dart/Flutter apps using GraphQL
  • Developers needing type-safe caching
  • Projects requiring real-time data synchronization
  • Apps with complex nested data structures
  • Teams building scalable GraphQL clients

Considerations

  • Requires integration with Ferry
  • Limited to GraphQL workflows
  • May require learning curve for normalization concepts
  • Dependent on GQL Dart ecosystem
  • Not suitable for non-GraphQL data sources

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

A simple, powerful GraphQL Client for Flutter and Dart

MIT License PRs Welcome Watch on GitHub Star on GitHub Watch on GitHub Discord

Documentation 📖

Features

  1. ✅ Fully Typed: work faster and safer with compile time checks and IDE autocomplete, including fully typed Cache reads and writes.
  2. 🔄 Built-In Code Generators: automatically generated immutable data classes for all your GraphQL Operations and Fragments, based on your schema.
  3. 🌐 Customizable Network Interface: highly customizable network interface using gql_link, allowing you to compose and extend Links.
  4. ✨ Normalized Optimistic Cache: keep data in sync with cache normalization and update your UI instantly with optimistic data.
  5. 💾 Multiple Data Stores: extensible Store interface with built-in MemoryStore and HiveStore (which uses hive for offline persistence).
  6. 📄 Refetch & Pagination: easily update responses with new data or combine multiple responses, allowing for seamless pagination.
  7. 📱 Flutter Widgets: Widgets for Queries, Mutations, and Subscriptions, available out of the box.
  8. 🧈 Smooth: Run queries in a separate Isolate to free up resources on the UI thread

Packages

This repo is a monorepo for ferry and related packages.

Pub Package Description
version package:ferry Stream-based GraphQL Client
version package:ferry_cache Normalized, strongly typed, optimistic cache
version package:ferry_exec Strongly typed GraphQL execution interface
version package:ferry_flutter Flutter Widgets for GraphQL Operations
version package:ferry_generator Dart Type Generator for GraphQL Operations
version package:ferry_store Data Persistence for ferry's cache
version package:ferry_hive_store Hive implementation of ferry_store
version package:normalize Normalization / denormalization of GraphQL data

Categories

Dependencies

Dependency list 7 items

Source repository

Projects using this package

No data available yet.