platform/graphql_schema/lib/src/gen.dart

14 lines
489 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,
{GraphQLFieldArgument<T, Serialized> argument,
GraphQLFieldResolver<T, Serialized> resolve,
GraphQLType<T, Serialized> type}) {
return new GraphQLField(name,
argument: argument, resolve: resolve, type: type);
}