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

套件詳情v0.12.0+6

ferry_generator

Ferry GraphQL 客戶端產生的類型

AndroidiOSmacOSWindowsLinux
近 30 天下載
6590
喜歡數
23
Pub 分數
120

安裝套件

flutter pub add ferry_generator

套件介紹

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

Ferry Generator 是一個用於 Ferry GraphQL 客戶端的程式碼產生工具,設計用來從 GraphQL 操作中建立類型安全的 Dart 類別。它透過根據模式和查詢檔案自動產生模型、查詢、變更和訂閱,簡化了 GraphQL 的使用。這能減少重複程式碼,並透過確保類型與 GraphQL API 相符來最小化執行時錯誤。該產生器可無縫整合至 Flutter 專案中,並支援多個平台,包括 Android、iOS、macOS、Windows 和 Linux。

適用情境

  • 自動生成 GraphQL 操作類型
  • 從 GraphQL 模式建立類型安全的模型
  • 簡化 Flutter 應用中的變更和查詢處理
  • 啟用 GraphQL 操作的編譯時驗證
  • 支援跨平台 GraphQL 客戶端

主要特色

  • 從 GraphQL 檔案生成 Dart 類
  • 確保 GraphQL 操作的類型安全
  • 與渡輪客戶端整合
  • 支援查詢、變更和訂閱
  • 產生最少的樣板程式碼

適合對象

  • 使用 Ferry GraphQL 客戶端的 Flutter 開發人員
  • 優先考慮 GraphQL 使用中的類型安全性團隊
  • 需要高效GraphQL代碼生成的項目
  • 針對多個平台且共享 GraphQL 逻辑的應用程式
  • 尋求減少手動代碼維護的開發人員

使用建議

  • 需要一個 GraphQL 模式和操作檔案
  • 依賴於Ferry客戶端以實現執行時功能
  • 需要在 pubspec.yaml 中進行正確設置
  • 可能需要為複雜架構進行額外設定
  • 最佳搭配 Ferry 的執行時間庫使用

原始 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

所屬分類

依賴

依賴清單 15 項

原始碼儲存庫

使用此套件的專案