gql_build
0.14.0, released 3 weeks ago by gql-dart.dev
Useful builders for your GraphQL SDL and documents.
What it does
Generates Dart code from GraphQL source, including AST representations, typed data views, variable classes, schema data classes, and built_value serializers.
AI-written summary of version 0.14.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want type-safe GraphQL requests and responses in Dart or Flutter
- You use build_runner and want to automatically generate GraphQL models and serializers
Skip it when
- You do not use code generation or build_runner in your project
- Your project does not use GraphQL
Strengths
- Provides multiple specialized builders like ast_builder, data_builder, var_builder, schema_builder, and serializer_builder
- Supports tristate optionals to distinguish between absent, null, and non-null values
- Customizable scalar type overrides and enum fallbacks
Weaknesses
- Requires setting up build_runner and code generation steps
- Relies on external code generation dependencies and built_value infrastructure
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 15
Requires adding the package and build_runner to dev_dependencies and configuring a build.yaml file for code generation.
tristate_optionals: trueAlternatives
Packages that do the same job and could replace gql_build.
- ferry_flutter
Flutter widgets for executing GraphQL operations using the ferry client
62Compare
Works with
Packages commonly used together with gql_build: ones it builds on, ones built on it, and its own family.
- analyzergql_build depends on itPerforms static analysis of Dart code for tool integration and embedding.
- yamlgql_build depends on itA Dart library for parsing YAML documents into Dart data structures.
- pub_semvergql_build depends on itVersions and version constraints implementing pub's versioning policy.
- globgql_build depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- built_valuegql_build depends on itImmutable value types with builders, enum classes and JSON serialization for Dart.
- dart_stylegql_build depends on itProvides an API and CLI to format Dart source code automatically.
- code_buildergql_build depends on itA fluent, builder-based library for generating valid Dart code programmatically.
- built_collectiongql_build depends on itImmutable collections based on SDK collections with builder pattern.