part of graphql_schema.src.schema; GraphQLObjectType objectType(String name, {String description, bool isInterface: false, Iterable fields = const [], Iterable interfaces = const []}) { var obj = new GraphQLObjectType(name, description, isInterface: isInterface) ..fields.addAll(fields ?? []); if (interfaces?.isNotEmpty == true) { for (var i in interfaces) { obj.inheritFrom(i); } } return obj; } GraphQLField field(String name, {Iterable> arguments: const [], GraphQLFieldResolver resolve, GraphQLType type, String deprecationReason}) { return new GraphQLField(name, arguments: arguments, resolve: resolve, type: type, deprecationReason: deprecationReason); }