platform/graphql_schema/lib/src/gen.dart

18 lines
663 B
Dart
Raw Normal View History

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