"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const v4_1 = __importDefault(require("uuid/v4"));
const typeorm_1 = require("typeorm");
const entities_1 = require("../../../entities");
exports.createGroup = {
    async createGroup(_, { group: attrs }) {
        const repository = typeorm_1.getRepository(entities_1.Group);
        const group = Object.assign({ id: v4_1.default() }, attrs);
        return await repository.save(group);
    }
};
//# sourceMappingURL=create-group.js.map