platform/graphql_schema/lib/src/gen.dart

14 lines
512 B
Dart
Raw Normal View History

2018-08-02 13:31:54 +00:00
part of graphql_schema.src.schema;
GraphQLObjectType objectType(String name,
[Iterable<GraphQLField> fields = const []]) =>
new GraphQLObjectType(name)..fields.addAll(fields ?? []);
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
}