platform/graphql_schema/lib/src/gen.dart

14 lines
545 B
Dart
Raw Normal View History

2018-08-02 13:31:54 +00:00
part of graphql_schema.src.schema;
GraphQLObjectType objectType(String name,
2018-08-02 19:22:16 +00:00
{String description, Iterable<GraphQLField> fields = const []}) =>
new GraphQLObjectType(name, description)..fields.addAll(fields ?? []);
2018-08-02 13:31:54 +00:00
GraphQLField<T, Serialized> field<T, Serialized>(String name,
2018-08-02 15:17:14 +00:00
{Iterable<GraphQLFieldArgument<T, Serialized>> arguments: const [],
2018-08-02 13:31:54 +00:00
GraphQLFieldResolver<T, Serialized> resolve,
2018-08-02 15:17:14 +00:00
GraphQLType<T, Serialized> type}) {
2018-08-02 13:31:54 +00:00
return new GraphQLField(name,
2018-08-02 15:17:14 +00:00
arguments: arguments, resolve: resolve, type: type);
2018-08-02 13:31:54 +00:00
}