brick_graphql_generators

Creator: coderz1093

Last updated:

0 purchases

brick_graphql_generators Image
brick_graphql_generators Images

Languages

Categories

Add to Cart

Description:

brick graphql generators

Brick GraphQL Build #
Code generator that provides (de)serializing functions for Brick adapters using GraphqlProvider. This package does not produce code. It can be imported into other Brick build domains.
This package should not be imported into an end application as it does not generate code.
Usage #
Apply the GraphQLSerdes in your own AnnotationSuperGenerator:
import 'package:brick_graphql_generators/graphql_serdes.dart';

class MyDomainGenerator extends AnnotationSuperGenerator<ConnectMyDomainWithGraphQL> {
final String superAdapterName;
final String repositoryName;

const OfflineFirstGenerator({
this.superAdapterName = 'MyDomain',
this.repositoryName = 'MyDomainWithGraphQL',
});

/// Given an [element] and an [annotation], scaffold generators
List<SerdesGenerator> buildGenerators(Element element, ConstantReader annotation) {
final graphql = GraphQLSerdes(element, annotation, repositoryName: repositoryName);
final otherProvider = OtherProviderSerdes(element, annotation, repositoryName: repositoryName);
final generators = <SerdesGenerator>[];
generators.addAll(graphql.generators);
generators.addAll(otherProvider.generators);
return generators;
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.