1 | "use strict";
|
2 | var __assign = (this && this.__assign) || function () {
|
3 | __assign = Object.assign || function(t) {
|
4 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5 | s = arguments[i];
|
6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7 | t[p] = s[p];
|
8 | }
|
9 | return t;
|
10 | };
|
11 | return __assign.apply(this, arguments);
|
12 | };
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 | exports.ManyToMany = void 0;
|
15 | var type_graphql_1 = require("type-graphql");
|
16 | var typeorm_1 = require("typeorm");
|
17 | var utils_1 = require("../utils");
|
18 | function ManyToMany(parentType, joinFunc, options) {
|
19 | if (options === void 0) { options = {}; }
|
20 | var factories = [
|
21 | type_graphql_1.Field(function () { return [parentType()]; }, __assign({ nullable: true }, options)),
|
22 | typeorm_1.ManyToMany(parentType, joinFunc, options)
|
23 | ];
|
24 | return utils_1.composeMethodDecorators.apply(void 0, factories);
|
25 | }
|
26 | exports.ManyToMany = ManyToMany;
|
27 |
|
\ | No newline at end of file |