搜尋套件、儲存庫與 APP 分類

套件詳情v0.10.1

ferry_cache

用於 GraphQL 操作和片段的標準化、強類型、樂觀快取

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
7.1萬
喜歡數
4
Pub 分數
140

安裝套件

flutter pub add ferry_cache

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Ferry Cache 是一個經過歸一化、強類型且樂觀的快取解決方案,專為 GraphQL 操作和片段設計。它透過以結構化、去重的格式儲存回應,確保高效資料管理,減少冗餘的網路請求。該快取支援即時更新和樂觀 UI 行為,在執行變更時提升使用者體驗。專為 GQL Dart 生態系統打造,可與 Ferry 無縫整合,實現跨多個平台的穩健客戶端狀態處理。

適用情境

  • 快取 GraphQL 查詢結果
  • 樂觀的 UI 更新在變更之後
  • 跨組件管理歸一化資料
  • 減少重複的網路呼叫
  • 支援離線優先的應用程式
  • 在應用程式的不同部分之間同步狀態

主要特色

  • 歸一化資料儲存
  • 快取項目之強類型
  • 樂觀更新
  • GraphQL 片段支援
  • 跨平台相容性
  • 與渡輪的整合

適合對象

  • 使用 GraphQL 的 Dart/Flutter 應用
  • 需要類型安全快取的開發人員
  • 需要即時資料同步的專案
  • 具有複雜嵌套資料結構的應用程式
  • 建構可擴展 GraphQL 客戶端的團隊

使用建議

  • 需要與渡輪整合
  • 限制為 GraphQL 工作流
  • 可能需要學習曲線來理解歸一化概念
  • 依賴於 GQL Dart 生態系統
  • 不適用於非GraphQL資料來源

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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

所屬分類

依賴

依賴清單 7 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。