gql_build 0.4.2-alpha+1659715356209 copy "gql_build: ^0.4.2-alpha+1659715356209" to clipboard
gql_build: ^0.4.2-alpha+1659715356209 copied to clipboard

outdated

Useful builders for your GraphQL SDL and documents. Based on package:gql_code_builder and package:build

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.

schema_builder #

Creates data classes from your specified graphql schema.

Configuration

type_overrides: [Map] Specify how scalar types should be serialized

Example:

type_overrides:
    CustomStringScalar:
      name: String
     CustomField:
       name: CustomField
       import: 'package:mypackage/custom_field.dart'

enum_fallbacks: [Map] Specify fallback values to enum values in order to not break the serializer when new enum values are added to the schema and the client has not updated to the new schema yet.

global_enum_fallbacks: [bool] Add a generated fallback value for each enum value (except for ones that have a custom fallback value specified in the enum_fallbacks map). Defaults to false.

Example:

global_enum_fallbacks: true # add a generated fallback value to all enums
enum_fallbacks:
    MyEnumType: OTHER   # except for the type 'MyEnumType', use the value 'OTHER' as fallback there

serializer_builder #

Creates built_value serializers for each built_value class.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

15
likes
0
points
817
downloads

Publisher

verified publishergql-dart.dev

Weekly Downloads

Useful builders for your GraphQL SDL and documents. Based on package:gql_code_builder and package:build

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, built_collection, built_value, built_value_generator, code_builder, dart_style, glob, gql, gql_code_builder, path, yaml

More

Packages that depend on gql_build