Skip to content
pubscout

ferry_generator

0.12.0+6, released 3 weeks ago by gql-dart.dev

A Dart code generator to create fully typed OperationRequests for the ferry GraphQL client.

$ flutter pub add ferry_generator
Source repository

What it does

Generates fully typed operation requests and data types to be used with the ferry GraphQL client based on your GraphQL documents and schema.

AI-written summary of version 0.12.0+6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter or Dart application using the ferry GraphQL client
  • You want compile-time type safety for your GraphQL operations and responses

Skip it when

  • You are not using GraphQL in your project
  • You prefer runtime-based or dynamic GraphQL queries without code generation

Strengths

  • Provides fully typed data structures for GraphQL queries, mutations, and subscriptions
  • Integrates smoothly with build_runner and the broader gql-dart ecosystem

Weaknesses

  • Requires running a code generator whenever GraphQL schemas or queries change
  • Adds multiple generated boilerplate dependencies to your project

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
15

Requires adding build_runner and configuring build.yaml to generate types alongside your source files.

not documented

Alternatives

Packages that do the same job and could replace ferry_generator.

  • sentry_link

    Automatic capture of exceptions and GraphQL errors for the gql ecosystem like graphql and ferry.

  • graphql_codegen

    Generate Dart serializers and client helpers from GraphQL queries and schemas.

  • graphql_flutter

    A GraphQL client for Flutter with widget wrappers and hooks.

  • graphql

    A Dart GraphQL client offering queries, mutations, subscriptions and cache management.

Works with

Packages commonly used together with ferry_generator: ones it builds on, ones built on it, and its own family.