Search packages, repositories and app categories

Package detailsv0.12.0+6

ferry_generator

Generated types for Ferry GraphQL Client

AndroidiOSmacOSWindowsLinux
30-day downloads
6.6K
Likes
23
Pub points
120

Install package

flutter pub add ferry_generator

Package Overview

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

Ferry Generator is a code generation tool for the Ferry GraphQL client, designed to create type-safe Dart classes from GraphQL operations. It simplifies working with GraphQL by automatically generating models, queries, mutations, and subscriptions based on schema and query files. This reduces boilerplate and minimizes runtime errors by ensuring types align with the GraphQL API. The generator integrates seamlessly into Flutter projects and supports multiple platforms including Android, iOS, macOS, Windows, and Linux.

Use cases

  • Automatically generate GraphQL operation types
  • Create type-safe models from GraphQL schema
  • Simplify mutation and query handling in Flutter apps
  • Enable compile-time validation of GraphQL operations
  • Support cross-platform GraphQL clients

Key features

  • Generates Dart classes from GraphQL files
  • Ensures type safety for GraphQL operations
  • Integrates with Ferry client
  • Supports queries, mutations, and subscriptions
  • Produces minimal boilerplate code

Suitable for

  • Flutter developers using Ferry GraphQL client
  • Teams prioritizing type safety in GraphQL usage
  • Projects requiring efficient GraphQL code generation
  • Apps targeting multiple platforms with shared GraphQL logic
  • Developers seeking reduced manual code maintenance

Considerations

  • Requires a GraphQL schema and operation files
  • Depends on Ferry client for runtime functionality
  • Needs proper setup in pubspec.yaml
  • May require additional configuration for complex schemas
  • Best used in conjunction with Ferry's runtime library

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 15 items

Source repository

Projects using this package