MIT License PRs Welcome Watch on GitHub Star on GitHub Watch on GitHub Discord

A package for Dart code generation from GraphQL source.

Builders in this package let you build your GraphQL requests and view the response in a type-safe way.

Usage example

See the gql_example_cli or gql_example_flutter for usage examples.

Provided builders

ast_builder

Generates an AST representation of a GraphQL Document

data_builder

Generates a typed view of your data.

var_builder

Creates data classes for any GraphQL variables used in a query or fragment.

enum_builder

Generates an enum-like class per GraphQL enum type. Defines known enum values to be used in your code, and allows unknown enum values to be used without causing runtime error when handling response data.

scalar_builder

Generates a container for a scalar value to be used when viewing the response data and building request variables.

schema_builder

Combines enum_builder, input_builder and scalar_builder.

serializer_builder

Creates built_value serializers for each built_value class.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

gql_build