"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const entities_1 = require("../../../entities");
exports.updatePlayGroup = {
    async updatePlayGroup(_, { id, patch }) {
        const repository = typeorm_1.getRepository(entities_1.PlayGroup);
        const playGroup = await repository.findOne({ id }, {
            relations: ['boards']
        });
        return await repository.save(Object.assign({}, playGroup, patch));
    }
};
//# sourceMappingURL=update-play-group.js.map