@tsed/apollo 6.98.5 → 6.100.2
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.
|
@@ -89,11 +89,9 @@ let ApolloService = class ApolloService {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
getPlugins(serverSettings) {
|
|
92
|
-
const playground = serverSettings.playground || serverSettings.playground === undefined;
|
|
92
|
+
const playground = serverSettings.playground || (serverSettings.playground === undefined && process.env.NODE_ENV !== "production");
|
|
93
93
|
return [
|
|
94
|
-
playground
|
|
95
|
-
? (0, apollo_server_core_1.ApolloServerPluginLandingPageDisabled)()
|
|
96
|
-
: (0, apollo_server_core_1.ApolloServerPluginLandingPageGraphQLPlayground)(),
|
|
94
|
+
playground ? (0, apollo_server_core_1.ApolloServerPluginLandingPageDisabled)() : (0, apollo_server_core_1.ApolloServerPluginLandingPageGraphQLPlayground)(),
|
|
97
95
|
this.httpServer &&
|
|
98
96
|
(0, apollo_server_core_1.ApolloServerPluginDrainHttpServer)({
|
|
99
97
|
httpServer: this.httpServer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApolloService.js","sourceRoot":"","sources":["../../../src/services/ApolloService.ts"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,yCAAoC;AACpC,yCAAiD;AAEjD,2DAK4B;AAI5B,6DAAwB;AACxB,+DAA0B;AAG1B,IAAa,aAAa,GAA1B,MAAa,aAAa;IAA1B;QAOE;;;;WAIG;QACO,YAAO,GAMb,IAAI,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ApolloService.js","sourceRoot":"","sources":["../../../src/services/ApolloService.ts"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,yCAAoC;AACpC,yCAAiD;AAEjD,2DAK4B;AAI5B,6DAAwB;AACxB,+DAA0B;AAG1B,IAAa,aAAa,GAA1B,MAAa,aAAa;IAA1B;QAOE;;;;WAIG;QACO,YAAO,GAMb,IAA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C,UAAU;iBAC5B,CAAC;YACJ,IAAI,CAAC,WAAW;gBACd,IAAA,sDAAiC,EAAC;oBAChC,UAAU,EAAE,IAAI,CAAC,WAAW;iBAC7B,CAAC;YACJ,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,EAAE,CAAC;SAClC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA/HC;IADC,IAAA,aAAQ,EAAC,eAAe,CAAC;;mDACL;AAGrB;IADC,IAAA,WAAM,GAAE;2CACS,eAAM;6CAAC;AAgBzB;IADC,IAAA,WAAM,GAAE;2CACI,4BAAmB;0CAAC;AAGjC;IADC,IAAA,WAAM,EAAC,cAAI,CAAC,MAAM,CAAC;;iDACmB;AAGvC;IADC,IAAA,WAAM,EAAC,eAAK,CAAC,MAAM,CAAC;;kDACoB;AA3B9B,aAAa;IADzB,IAAA,YAAO,GAAE;GACG,aAAa,CAiIzB;AAjIY,sCAAa","sourcesContent":["import {Constant, Inject, Service} from \"@tsed/di\";\nimport {Logger} from \"@tsed/logger\";\nimport {PlatformApplication} from \"@tsed/common\";\nimport type {Config} from \"apollo-server-core\";\nimport {\n ApolloServerBase,\n ApolloServerPluginDrainHttpServer,\n ApolloServerPluginLandingPageDisabled,\n ApolloServerPluginLandingPageGraphQLPlayground\n} from \"apollo-server-core\";\nimport type {GraphQLSchema} from \"graphql\";\nimport type {ApolloServer, ApolloSettings} from \"../interfaces/ApolloSettings\";\nimport {ApolloCustomServerCB} from \"../interfaces/ApolloSettings\";\nimport Http from \"http\";\nimport Https from \"https\";\n\n@Service()\nexport class ApolloService {\n @Constant(\"PLATFORM_NAME\")\n platformName: string;\n\n @Inject()\n protected logger: Logger;\n\n /**\n *\n * @type {Map<any, any>}\n * @private\n */\n protected servers: Map<\n string,\n {\n instance: ApolloServerBase;\n schema: GraphQLSchema | undefined;\n }\n > = new Map();\n\n @Inject()\n private app: PlatformApplication;\n\n @Inject(Http.Server)\n private httpServer: Http.Server | null;\n\n @Inject(Https.Server)\n private httpsServer: Https.Server | null;\n\n async createServer(id: string, settings: ApolloSettings): Promise<any> {\n if (this.has(id)) {\n return this.get(id)!;\n }\n\n try {\n const {path, middlewareOptions = {}, server: customServer, ...config} = settings;\n\n this.logger.info(`Create server with Apollo for: ${id}`);\n this.logger.debug(`options: ${JSON.stringify({path})}`);\n\n const server = this.createInstance(\n {\n ...config,\n plugins: this.getPlugins(settings)\n },\n customServer\n );\n\n if (server) {\n this.servers.set(id || \"default\", {\n instance: server,\n schema: settings.schema\n });\n\n await server.start();\n\n await server.applyMiddleware({\n path: settings.path,\n ...middlewareOptions,\n app: this.app.raw\n });\n\n return server;\n }\n } catch (err) {\n /* istanbul ignore next */\n this.logger.error(err);\n /* istanbul ignore next */\n process.exit(-1);\n }\n }\n\n /**\n * Get an instance of ApolloServer from his id\n * @returns ApolloServer\n */\n get(id: string = \"default\"): ApolloServerBase | undefined {\n return this.servers.get(id)?.instance;\n }\n\n /**\n * Get an instance of GraphQL schema from his id\n * @returns GraphQLSchema\n */\n getSchema(id: string = \"default\"): GraphQLSchema | undefined {\n return this.servers.get(id)?.schema;\n }\n\n /**\n *\n * @param {string} id\n * @returns {boolean}\n */\n has(id: string = \"default\"): boolean {\n return this.servers.has(id);\n }\n\n protected createInstance(options: Config, server?: ApolloCustomServerCB): ApolloServer | undefined {\n // istanbul ignore next\n if (server) {\n return server(options);\n }\n\n // istanbul ignore next\n try {\n const Server = require(`apollo-server-${this.platformName || \"express\"}`).ApolloServer;\n\n return new Server(options);\n } catch (er) {\n this.logger.error(`Platform \"${this.platformName}\" not supported by @tsed/apollo`);\n }\n }\n\n private getPlugins(serverSettings: ApolloSettings): any[] {\n const playground = serverSettings.playground || (serverSettings.playground === undefined && process.env.NODE_ENV !== \"production\");\n\n return [\n playground ? ApolloServerPluginLandingPageDisabled() : ApolloServerPluginLandingPageGraphQLPlayground(),\n this.httpServer &&\n ApolloServerPluginDrainHttpServer({\n httpServer: this.httpServer\n }),\n this.httpsServer &&\n ApolloServerPluginDrainHttpServer({\n httpServer: this.httpsServer\n }),\n ...(serverSettings.plugins || [])\n ].filter(Boolean);\n }\n}\n"]}
|
|
@@ -86,11 +86,9 @@ let ApolloService = class ApolloService {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
getPlugins(serverSettings) {
|
|
89
|
-
const playground = serverSettings.playground || serverSettings.playground === undefined;
|
|
89
|
+
const playground = serverSettings.playground || (serverSettings.playground === undefined && process.env.NODE_ENV !== "production");
|
|
90
90
|
return [
|
|
91
|
-
playground
|
|
92
|
-
? ApolloServerPluginLandingPageDisabled()
|
|
93
|
-
: ApolloServerPluginLandingPageGraphQLPlayground(),
|
|
91
|
+
playground ? ApolloServerPluginLandingPageDisabled() : ApolloServerPluginLandingPageGraphQLPlayground(),
|
|
94
92
|
this.httpServer &&
|
|
95
93
|
ApolloServerPluginDrainHttpServer({
|
|
96
94
|
httpServer: this.httpServer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApolloService.js","sourceRoot":"","sources":["../../../src/services/ApolloService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAEjD,OAAO,EAEL,iCAAiC,EACjC,qCAAqC,EACrC,8CAA8C,EAC/C,MAAM,oBAAoB,CAAC;AAI5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,IAAa,aAAa,GAA1B,MAAa,aAAa;IAA1B;QAOE;;;;WAIG;QACO,YAAO,GAMb,IAAI,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ApolloService.js","sourceRoot":"","sources":["../../../src/services/ApolloService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAA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,CAAC,CAAC;SACpF;IACH,CAAC;IAEO,UAAU,CAAC,cAA8B;QAC/C,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,IAAI,CAAC,cAAc,CAAC,UAAU,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC;QAEnI,OAAO;YACL,UAAU,CAAC,CAAC,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC,8CAA8C,EAAE;YACvG,IAAI,CAAC,UAAU;gBACb,iCAAiC,CAAC;oBAChC,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC5B,CAAC;YACJ,IAAI,CAAC,WAAW;gBACd,iCAAiC,CAAC;oBAChC,UAAU,EAAE,IAAI,CAAC,WAAW;iBAC7B,CAAC;YACJ,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,EAAE,CAAC;SAClC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA/HC;IADC,QAAQ,CAAC,eAAe,CAAC;;mDACL;AAGrB;IADC,MAAM,EAAE;8BACS,MAAM;6CAAC;AAgBzB;IADC,MAAM,EAAE;8BACI,mBAAmB;0CAAC;AAGjC;IADC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;;iDACmB;AAGvC;IADC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;;kDACoB;AA3B9B,aAAa;IADzB,OAAO,EAAE;GACG,aAAa,CAiIzB;SAjIY,aAAa","sourcesContent":["import {Constant, Inject, Service} from \"@tsed/di\";\nimport {Logger} from \"@tsed/logger\";\nimport {PlatformApplication} from \"@tsed/common\";\nimport type {Config} from \"apollo-server-core\";\nimport {\n ApolloServerBase,\n ApolloServerPluginDrainHttpServer,\n ApolloServerPluginLandingPageDisabled,\n ApolloServerPluginLandingPageGraphQLPlayground\n} from \"apollo-server-core\";\nimport type {GraphQLSchema} from \"graphql\";\nimport type {ApolloServer, ApolloSettings} from \"../interfaces/ApolloSettings\";\nimport {ApolloCustomServerCB} from \"../interfaces/ApolloSettings\";\nimport Http from \"http\";\nimport Https from \"https\";\n\n@Service()\nexport class ApolloService {\n @Constant(\"PLATFORM_NAME\")\n platformName: string;\n\n @Inject()\n protected logger: Logger;\n\n /**\n *\n * @type {Map<any, any>}\n * @private\n */\n protected servers: Map<\n string,\n {\n instance: ApolloServerBase;\n schema: GraphQLSchema | undefined;\n }\n > = new Map();\n\n @Inject()\n private app: PlatformApplication;\n\n @Inject(Http.Server)\n private httpServer: Http.Server | null;\n\n @Inject(Https.Server)\n private httpsServer: Https.Server | null;\n\n async createServer(id: string, settings: ApolloSettings): Promise<any> {\n if (this.has(id)) {\n return this.get(id)!;\n }\n\n try {\n const {path, middlewareOptions = {}, server: customServer, ...config} = settings;\n\n this.logger.info(`Create server with Apollo for: ${id}`);\n this.logger.debug(`options: ${JSON.stringify({path})}`);\n\n const server = this.createInstance(\n {\n ...config,\n plugins: this.getPlugins(settings)\n },\n customServer\n );\n\n if (server) {\n this.servers.set(id || \"default\", {\n instance: server,\n schema: settings.schema\n });\n\n await server.start();\n\n await server.applyMiddleware({\n path: settings.path,\n ...middlewareOptions,\n app: this.app.raw\n });\n\n return server;\n }\n } catch (err) {\n /* istanbul ignore next */\n this.logger.error(err);\n /* istanbul ignore next */\n process.exit(-1);\n }\n }\n\n /**\n * Get an instance of ApolloServer from his id\n * @returns ApolloServer\n */\n get(id: string = \"default\"): ApolloServerBase | undefined {\n return this.servers.get(id)?.instance;\n }\n\n /**\n * Get an instance of GraphQL schema from his id\n * @returns GraphQLSchema\n */\n getSchema(id: string = \"default\"): GraphQLSchema | undefined {\n return this.servers.get(id)?.schema;\n }\n\n /**\n *\n * @param {string} id\n * @returns {boolean}\n */\n has(id: string = \"default\"): boolean {\n return this.servers.has(id);\n }\n\n protected createInstance(options: Config, server?: ApolloCustomServerCB): ApolloServer | undefined {\n // istanbul ignore next\n if (server) {\n return server(options);\n }\n\n // istanbul ignore next\n try {\n const Server = require(`apollo-server-${this.platformName || \"express\"}`).ApolloServer;\n\n return new Server(options);\n } catch (er) {\n this.logger.error(`Platform \"${this.platformName}\" not supported by @tsed/apollo`);\n }\n }\n\n private getPlugins(serverSettings: ApolloSettings): any[] {\n const playground = serverSettings.playground || (serverSettings.playground === undefined && process.env.NODE_ENV !== \"production\");\n\n return [\n playground ? ApolloServerPluginLandingPageDisabled() : ApolloServerPluginLandingPageGraphQLPlayground(),\n this.httpServer &&\n ApolloServerPluginDrainHttpServer({\n httpServer: this.httpServer\n }),\n this.httpsServer &&\n ApolloServerPluginDrainHttpServer({\n httpServer: this.httpsServer\n }),\n ...(serverSettings.plugins || [])\n ].filter(Boolean);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/apollo",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.100.2",
|
|
4
4
|
"description": "Apollo package for Ts.ED framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"private": false,
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tsed/common": "6.
|
|
26
|
-
"@tsed/core": "6.
|
|
27
|
-
"@tsed/di": "6.
|
|
25
|
+
"@tsed/common": "6.100.2",
|
|
26
|
+
"@tsed/core": "6.100.2",
|
|
27
|
+
"@tsed/di": "6.100.2",
|
|
28
28
|
"@tsed/logger": "^6.0.0",
|
|
29
29
|
"@types/graphql": "14.5.0",
|
|
30
30
|
"apollo-datasource": "^3.2.0",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"graphql": "15.7.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@tsed/common": "^6.
|
|
40
|
-
"@tsed/core": "^6.
|
|
41
|
-
"@tsed/di": "^6.
|
|
39
|
+
"@tsed/common": "^6.100.2",
|
|
40
|
+
"@tsed/core": "^6.100.2",
|
|
41
|
+
"@tsed/di": "^6.100.2",
|
|
42
42
|
"@tsed/logger": ">6.0.0",
|
|
43
43
|
"apollo-datasource": ">=3.0.0",
|
|
44
44
|
"apollo-datasource-rest": ">=3.0.0",
|