@tsed/typegraphql 8.0.0-alpha.5 → 8.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/TypeGraphQLModule.js +1 -1
- package/lib/esm/TypeGraphQLModule.js.map +1 -1
- package/lib/esm/decorators/resolver.js.map +1 -1
- package/lib/types/TypeGraphQLModule.d.ts +1 -1
- package/lib/types/interfaces/interfaces.d.ts +1 -1
- package/package.json +12 -13
- package/vitest.config.mts +3 -3
- package/lib/cjs/TypeGraphQLModule.js +0 -62
- package/lib/cjs/TypeGraphQLModule.js.map +0 -1
- package/lib/cjs/constants/constants.js +0 -5
- package/lib/cjs/constants/constants.js.map +0 -1
- package/lib/cjs/decorators/resolver.js +0 -32
- package/lib/cjs/decorators/resolver.js.map +0 -1
- package/lib/cjs/exports.js +0 -7
- package/lib/cjs/exports.js.map +0 -1
- package/lib/cjs/index.js +0 -14
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/TypeGraphQLSettings.js +0 -3
- package/lib/cjs/interfaces/TypeGraphQLSettings.js.map +0 -1
- package/lib/cjs/interfaces/interfaces.js +0 -3
- package/lib/cjs/interfaces/interfaces.js.map +0 -1
- package/lib/cjs/middlewares/ContextMiddleware.js +0 -10
- package/lib/cjs/middlewares/ContextMiddleware.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/TypeGraphQLModule.d.ts +0 -13
- package/lib/types-esm/constants/constants.d.ts +0 -1
- package/lib/types-esm/decorators/resolver.d.ts +0 -8
- package/lib/types-esm/exports.d.ts +0 -1
- package/lib/types-esm/index.d.ts +0 -10
- package/lib/types-esm/interfaces/TypeGraphQLSettings.d.ts +0 -1
- package/lib/types-esm/interfaces/interfaces.d.ts +0 -23
- package/lib/types-esm/middlewares/ContextMiddleware.d.ts +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import "./interfaces/interfaces.js";
|
|
2
3
|
import { isClass } from "@tsed/core";
|
|
3
4
|
import { Configuration, Inject, InjectorService, Module } from "@tsed/di";
|
|
4
5
|
import { buildSchema } from "type-graphql";
|
|
5
6
|
import { RESOLVERS_PROVIDERS } from "./constants/constants.js";
|
|
6
|
-
import "./interfaces/interfaces.js";
|
|
7
7
|
import { ContextMiddleware } from "./middlewares/ContextMiddleware.js";
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphQLModule.js","sourceRoot":"","sources":["../../src/TypeGraphQLModule.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TypeGraphQLModule.js","sourceRoot":"","sources":["../../src/TypeGraphQLModule.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAC;AAGpC,OAAO,EAAC,OAAO,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AACxE,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AAErE;;GAEG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAO5B,KAAK,CAAC,oBAAoB,CAAC,QAA8B;QACvD,MAAM,EAAC,SAAS,EAAE,gBAAgB,GAAG,EAAE,EAAE,kBAAkB,GAAG,EAAE,EAAE,GAAG,aAAa,EAAC,GAAG,QAAQ,CAAC;QAE/F,MAAM,SAAS,GAAQ,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAI,gBAA0B,EAAE,GAAG,CAAC,kBAAkB,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAEjI,aA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AD7B,MAAM,EAAE;GACI,iBAAiB,CAgD7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/decorators/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAY,QAAQ,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/decorators/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAY,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAU9D,MAAM,UAAU,kBAAkB,CAAC,GAAG,IAAW;IAC/C,IAAI,EAAE,GAAG,SAAS,CAAC;IACnB,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,CAAC;YACJ,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAChC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;iBAAM,CAAC;gBACN,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpB,CAAC;YACD,MAAM;QACR,KAAK,CAAC;YACJ,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAClB,MAAM;IACV,CAAC;IACD,OAAO,aAAa,CACjB,QAAgB,CAAC,GAAG,IAAI,CAAC,EAC1B,UAAU,CAAC;QACT,IAAI,EAAE,mBAAmB;KAC1B,CAAC,EACF,QAAQ,CAAC,SAAS,EAAE;QAClB,EAAE;KACH,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import "./interfaces/interfaces.js";
|
|
1
2
|
import { AlterApolloSettings, ApolloSettingsWithID } from "@tsed/apollo";
|
|
2
3
|
import { Type } from "@tsed/core";
|
|
3
4
|
import { Configuration, InjectorService } from "@tsed/di";
|
|
4
|
-
import "./interfaces/interfaces.js";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/typegraphql",
|
|
3
3
|
"description": "TypeGraphQL package for Ts.ED framework, based on Apollo-server-core and Type-graphql",
|
|
4
|
-
"type": "
|
|
5
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "8.0.0-alpha.7",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
|
-
"main": "./lib/
|
|
7
|
+
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
9
|
"typings": "./lib/types/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./lib/types/index.d.ts",
|
|
13
13
|
"import": "./lib/esm/index.js",
|
|
14
|
-
"require": "./lib/cjs/index.js",
|
|
15
14
|
"default": "./lib/cjs/index.js"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
@@ -25,26 +24,26 @@
|
|
|
25
24
|
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@tsed/apollo": "8.0.0-alpha.
|
|
29
|
-
"tslib": "2.
|
|
27
|
+
"@tsed/apollo": "8.0.0-alpha.7",
|
|
28
|
+
"tslib": "2.7.0"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@graphql-yoga/subscription": "5.0.0",
|
|
33
|
-
"@tsed/barrels": "8.0.0-alpha.
|
|
34
|
-
"@tsed/common": "8.0.0-alpha.
|
|
35
|
-
"@tsed/core": "8.0.0-alpha.
|
|
36
|
-
"@tsed/platform-express": "8.0.0-alpha.
|
|
37
|
-
"@tsed/typescript": "8.0.0-alpha.
|
|
32
|
+
"@tsed/barrels": "8.0.0-alpha.7",
|
|
33
|
+
"@tsed/common": "8.0.0-alpha.7",
|
|
34
|
+
"@tsed/core": "8.0.0-alpha.7",
|
|
35
|
+
"@tsed/platform-express": "8.0.0-alpha.7",
|
|
36
|
+
"@tsed/typescript": "8.0.0-alpha.7",
|
|
38
37
|
"@types/graphql": "^14.5.0",
|
|
39
38
|
"class-validator": "~0.14.1",
|
|
40
39
|
"cross-env": "^7.0.3",
|
|
41
|
-
"eslint": "
|
|
40
|
+
"eslint": "9.11.1",
|
|
42
41
|
"graphql": "16.8.2",
|
|
43
42
|
"graphql-passport": "^0.6.8",
|
|
44
43
|
"graphql-scalars": "1.23.0",
|
|
45
44
|
"ts-node": "10.9.2",
|
|
46
45
|
"type-graphql": ">=2.0.0-rc.2",
|
|
47
|
-
"typescript": "4.
|
|
46
|
+
"typescript": "5.4.5",
|
|
48
47
|
"vitest": "2.0.4"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
package/vitest.config.mts
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeGraphQLModule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@tsed/core");
|
|
6
|
-
const di_1 = require("@tsed/di");
|
|
7
|
-
const type_graphql_1 = require("type-graphql");
|
|
8
|
-
const constants_js_1 = require("./constants/constants.js");
|
|
9
|
-
require("./interfaces/interfaces.js");
|
|
10
|
-
const ContextMiddleware_js_1 = require("./middlewares/ContextMiddleware.js");
|
|
11
|
-
/**
|
|
12
|
-
* @ignore
|
|
13
|
-
*/
|
|
14
|
-
let TypeGraphQLModule = class TypeGraphQLModule {
|
|
15
|
-
async $alterApolloSettings(settings) {
|
|
16
|
-
const { resolvers: initialResolvers = [], buildSchemaOptions = {}, ...serverOptions } = settings;
|
|
17
|
-
const resolvers = this.getResolvers(settings.id, [...initialResolvers, ...(buildSchemaOptions.resolvers || [])]);
|
|
18
|
-
serverOptions.schema = await (0, type_graphql_1.buildSchema)({
|
|
19
|
-
container: this.injector,
|
|
20
|
-
...buildSchemaOptions,
|
|
21
|
-
resolvers,
|
|
22
|
-
globalMiddlewares: [ContextMiddleware_js_1.ContextMiddleware, ...(buildSchemaOptions.globalMiddlewares || [])]
|
|
23
|
-
});
|
|
24
|
-
return serverOptions;
|
|
25
|
-
}
|
|
26
|
-
getResolvers(id, resolvers) {
|
|
27
|
-
const globalResolvers = this.injector
|
|
28
|
-
.getProviders(constants_js_1.RESOLVERS_PROVIDERS)
|
|
29
|
-
.filter((provider) => {
|
|
30
|
-
const opts = provider.store.get("graphql");
|
|
31
|
-
return !opts?.id || opts?.id === id;
|
|
32
|
-
})
|
|
33
|
-
.map((provider) => {
|
|
34
|
-
return provider.useClass;
|
|
35
|
-
});
|
|
36
|
-
return resolvers
|
|
37
|
-
.map((resolver) => {
|
|
38
|
-
if (!(this.injector.has(resolver) || !(0, core_1.isClass)(resolver))) {
|
|
39
|
-
this.injector
|
|
40
|
-
.addProvider(resolver, {
|
|
41
|
-
useClass: resolver
|
|
42
|
-
})
|
|
43
|
-
.invoke(resolver);
|
|
44
|
-
}
|
|
45
|
-
return resolver;
|
|
46
|
-
})
|
|
47
|
-
.concat(globalResolvers);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
tslib_1.__decorate([
|
|
51
|
-
(0, di_1.Inject)(),
|
|
52
|
-
tslib_1.__metadata("design:type", di_1.InjectorService)
|
|
53
|
-
], TypeGraphQLModule.prototype, "injector", void 0);
|
|
54
|
-
tslib_1.__decorate([
|
|
55
|
-
(0, di_1.Configuration)(),
|
|
56
|
-
tslib_1.__metadata("design:type", Object)
|
|
57
|
-
], TypeGraphQLModule.prototype, "configuration", void 0);
|
|
58
|
-
TypeGraphQLModule = tslib_1.__decorate([
|
|
59
|
-
(0, di_1.Module)()
|
|
60
|
-
], TypeGraphQLModule);
|
|
61
|
-
exports.TypeGraphQLModule = TypeGraphQLModule;
|
|
62
|
-
//# sourceMappingURL=TypeGraphQLModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphQLModule.js","sourceRoot":"","sources":["../../src/TypeGraphQLModule.ts"],"names":[],"mappings":";;;;AACA,qCAAyC;AACzC,iCAAwE;AACxE,+CAAyC;AACzC,2DAA6D;AAC7D,sCAAoC;AACpC,6EAAqE;AAErE;;GAEG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAO5B,KAAK,CAAC,oBAAoB,CAAC,QAA8B;QACvD,MAAM,EAAC,SAAS,EAAE,gBAAgB,GAAG,EAAE,EAAE,kBAAkB,GAAG,EAAE,EAAE,GAAG,aAAa,EAAC,GAAG,QAAQ,CAAC;QAE/F,MAAM,SAAS,GAAQ,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAI,gBAA0B,EAAE,GAAG,CAAC,kBAAkB,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAEjI,aAAa,CAAC,MAAM,GAAG,MAAM,IAAA,0BAAW,EAAC;YACvC,SAAS,EAAE,IAAI,CAAC,QAAiB;YACjC,GAAG,kBAAkB;YACrB,SAAS;YACT,iBAAiB,EAAE,CAAC,wCAAiB,EAAE,GAAG,CAAC,kBAAkB,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;SACxF,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC;IACvB,CAAC;IAES,YAAY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2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResolverController = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const di_1 = require("@tsed/di");
|
|
6
|
-
const type_graphql_1 = require("type-graphql");
|
|
7
|
-
const constants_js_1 = require("../constants/constants.js");
|
|
8
|
-
function ResolverController(...args) {
|
|
9
|
-
let id = undefined;
|
|
10
|
-
switch (args.length) {
|
|
11
|
-
case 1:
|
|
12
|
-
if (typeof args[0] === "string") {
|
|
13
|
-
id = args[0];
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
id = args[0].id;
|
|
17
|
-
delete args[0].id;
|
|
18
|
-
}
|
|
19
|
-
break;
|
|
20
|
-
case 2:
|
|
21
|
-
id = args[1].id;
|
|
22
|
-
delete args[1].id;
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
return (0, core_1.useDecorators)(type_graphql_1.Resolver(...args), (0, di_1.Injectable)({
|
|
26
|
-
type: constants_js_1.RESOLVERS_PROVIDERS
|
|
27
|
-
}), (0, core_1.StoreSet)("graphql", {
|
|
28
|
-
id
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
exports.ResolverController = ResolverController;
|
|
32
|
-
//# sourceMappingURL=resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/decorators/resolver.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAAoC;AACpC,+CAAiD;AACjD,4DAA8D;AAU9D,SAAgB,kBAAkB,CAAC,GAAG,IAAW;IAC/C,IAAI,EAAE,GAAG,SAAS,CAAC;IACnB,QAAQ,IAAI,CAAC,MAAM,EAAE;QACnB,KAAK,CAAC;YACJ,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;gBAC/B,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;aACd;iBAAM;gBACL,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACnB;YACD,MAAM;QACR,KAAK,CAAC;YACJ,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAClB,MAAM;KACT;IACD,OAAO,IAAA,oBAAa,EACjB,uBAAgB,CAAC,GAAG,IAAI,CAAC,EAC1B,IAAA,eAAU,EAAC;QACT,IAAI,EAAE,kCAAmB;KAC1B,CAAC,EACF,IAAA,eAAQ,EAAC,SAAS,EAAE;QAClB,EAAE;KACH,CAAC,CACH,CAAC;AACJ,CAAC;AAzBD,gDAyBC"}
|
package/lib/cjs/exports.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataSourceService = exports.DataSource = void 0;
|
|
4
|
-
var apollo_1 = require("@tsed/apollo");
|
|
5
|
-
Object.defineProperty(exports, "DataSource", { enumerable: true, get: function () { return apollo_1.DataSource; } });
|
|
6
|
-
Object.defineProperty(exports, "DataSourceService", { enumerable: true, get: function () { return apollo_1.DataSourceService; } });
|
|
7
|
-
//# sourceMappingURL=exports.js.map
|
package/lib/cjs/exports.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":";;;AAAA,uCAA2D;AAAnD,oGAAA,UAAU,OAAA;AAAE,2GAAA,iBAAiB,OAAA"}
|
package/lib/cjs/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/**
|
|
5
|
-
* @file Automatically generated by @tsed/barrels.
|
|
6
|
-
*/
|
|
7
|
-
tslib_1.__exportStar(require("./constants/constants.js"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./decorators/resolver.js"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./exports.js"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./interfaces/interfaces.js"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./interfaces/TypeGraphQLSettings.js"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./middlewares/ContextMiddleware.js"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./TypeGraphQLModule.js"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAAyC;AACzC,mEAAyC;AACzC,uDAA6B;AAC7B,qEAA2C;AAC3C,8EAAoD;AACpD,6EAAmD;AACnD,iEAAuC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeGraphQLSettings.js","sourceRoot":"","sources":["../../../src/interfaces/TypeGraphQLSettings.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextMiddleware = void 0;
|
|
4
|
-
const di_1 = require("@tsed/di");
|
|
5
|
-
const ContextMiddleware = (action, next) => {
|
|
6
|
-
const $ctx = (0, di_1.useContext)(action.context?.req?.$ctx);
|
|
7
|
-
return (0, di_1.runInContext)($ctx, next);
|
|
8
|
-
};
|
|
9
|
-
exports.ContextMiddleware = ContextMiddleware;
|
|
10
|
-
//# sourceMappingURL=ContextMiddleware.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/ContextMiddleware.ts"],"names":[],"mappings":";;;AAAA,iCAAkE;AAG3D,MAAM,iBAAiB,GAA2C,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IACxF,MAAM,IAAI,GAAG,IAAA,eAAU,EAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACnD,OAAO,IAAA,iBAAY,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B"}
|
package/lib/cjs/package.json
DELETED
package/lib/esm/package.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AlterApolloSettings, ApolloSettingsWithID } from "@tsed/apollo";
|
|
2
|
-
import { Type } from "@tsed/core";
|
|
3
|
-
import { Configuration, InjectorService } from "@tsed/di";
|
|
4
|
-
import "./interfaces/interfaces.js";
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export declare class TypeGraphQLModule implements AlterApolloSettings {
|
|
9
|
-
protected injector: InjectorService;
|
|
10
|
-
protected configuration: Configuration;
|
|
11
|
-
$alterApolloSettings(settings: ApolloSettingsWithID): Promise<ApolloSettingsWithID>;
|
|
12
|
-
protected getResolvers(id: string, resolvers: Type<any>[]): Type<any>[];
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RESOLVERS_PROVIDERS = "graphql:resolvers";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ClassType } from "type-graphql";
|
|
2
|
-
export interface ResolverControllerOptions {
|
|
3
|
-
id?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function ResolverController(): ClassDecorator;
|
|
6
|
-
export declare function ResolverController(path: string): ClassDecorator;
|
|
7
|
-
export declare function ResolverController(typeFunc: (of?: void) => ClassType | Function, options?: ResolverControllerOptions): ClassDecorator;
|
|
8
|
-
export declare function ResolverController(objectType: ClassType, options?: ResolverControllerOptions): ClassDecorator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DataSource, DataSourceService } from "@tsed/apollo";
|
package/lib/types-esm/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Automatically generated by @tsed/barrels.
|
|
3
|
-
*/
|
|
4
|
-
export * from "./constants/constants.js";
|
|
5
|
-
export * from "./decorators/resolver.js";
|
|
6
|
-
export * from "./exports.js";
|
|
7
|
-
export * from "./interfaces/interfaces.js";
|
|
8
|
-
export * from "./interfaces/TypeGraphQLSettings.js";
|
|
9
|
-
export * from "./middlewares/ContextMiddleware.js";
|
|
10
|
-
export * from "./TypeGraphQLModule.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BuildSchemaOptions } from "type-graphql";
|
|
2
|
-
import type { ApolloSettings as AS } from "@tsed/apollo";
|
|
3
|
-
declare global {
|
|
4
|
-
namespace TsED {
|
|
5
|
-
interface ApolloSettings {
|
|
6
|
-
buildSchemaOptions?: Partial<BuildSchemaOptions>;
|
|
7
|
-
}
|
|
8
|
-
interface Configuration {
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Use apollo instead
|
|
11
|
-
*/
|
|
12
|
-
graphql: {
|
|
13
|
-
[key: string]: AS;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use apollo instead
|
|
17
|
-
*/
|
|
18
|
-
typegraphql: {
|
|
19
|
-
[key: string]: AS;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|