@inversifyjs/apollo-express 0.4.0 → 0.5.0
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/CHANGELOG.md +11 -0
- package/lib/esm/apollo/modules/ApolloExpressServerContainerModule.d.ts.map +1 -1
- package/lib/esm/apollo/modules/ApolloExpressServerContainerModule.js +7 -5
- package/lib/esm/apollo/modules/ApolloExpressServerContainerModule.js.map +1 -1
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +0 -1
- package/lib/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/lib/esm/apollo/models/httpServerServiceIdentifier.d.ts +0 -4
- package/lib/esm/apollo/models/httpServerServiceIdentifier.d.ts.map +0 -1
- package/lib/esm/apollo/models/httpServerServiceIdentifier.js +0 -2
- package/lib/esm/apollo/models/httpServerServiceIdentifier.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApolloExpressServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,
|
|
1
|
+
{"version":3,"file":"ApolloExpressServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,EAK5B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,oCAAoC,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;WAC3E,UAAU,CAAC,QAAQ,SAAS,WAAW,EACnD,iBAAiB,EAAE,oCAAoC,CAAC,QAAQ,CAAC,EACjE,aAAa,EAAE,yBAAyB,CAAC,QAAQ,CAAC,GACjD,kCAAkC;CAwCtC"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer';
|
|
3
|
-
import { ApolloServerContainerModule, apolloServerPluginsServiceIdentifier, apolloServerResolversServiceIdentifier, apolloServerTypeDefsServiceIdentifier, } from '@inversifyjs/apollo-core';
|
|
3
|
+
import { ApolloServerContainerModule, apolloServerPluginsServiceIdentifier, apolloServerResolversServiceIdentifier, apolloServerTypeDefsServiceIdentifier, httpServerServiceIdentifier, } from '@inversifyjs/apollo-core';
|
|
4
4
|
import { httpApplicationServiceIdentifier } from '@inversifyjs/http-core';
|
|
5
5
|
import buildApolloServerExpressController from '../controllers/buildApolloServerExpressController.js';
|
|
6
|
-
import { httpServerServiceIdentifier } from '../models/httpServerServiceIdentifier.js';
|
|
7
6
|
export default class ApolloExpressServerContainerModule extends ApolloServerContainerModule {
|
|
8
7
|
static forOptions(controllerOptions, serverOptions) {
|
|
9
8
|
return new ApolloExpressServerContainerModule((options) => {
|
|
10
9
|
options
|
|
11
10
|
.bind(buildApolloServerExpressController(controllerOptions))
|
|
12
|
-
.toSelf()
|
|
11
|
+
.toSelf()
|
|
12
|
+
.inSingletonScope();
|
|
13
13
|
options
|
|
14
14
|
.bind(httpServerServiceIdentifier)
|
|
15
|
-
.toResolvedValue((application) => (serverOptions.http?.createServer ?? http.createServer)(application), [httpApplicationServiceIdentifier])
|
|
15
|
+
.toResolvedValue((application) => (serverOptions.http?.createServer ?? http.createServer)(application), [httpApplicationServiceIdentifier])
|
|
16
|
+
.inSingletonScope();
|
|
16
17
|
options
|
|
17
18
|
.bind(apolloServerPluginsServiceIdentifier)
|
|
18
19
|
.toResolvedValue((httpServer) => [
|
|
19
20
|
...(serverOptions.plugins ?? []),
|
|
20
21
|
ApolloServerPluginDrainHttpServer({ httpServer }),
|
|
21
|
-
], [httpServerServiceIdentifier])
|
|
22
|
+
], [httpServerServiceIdentifier])
|
|
23
|
+
.inSingletonScope();
|
|
22
24
|
options
|
|
23
25
|
.bind(apolloServerResolversServiceIdentifier)
|
|
24
26
|
.toService(serverOptions.resolverServiceIdentifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApolloExpressServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,
|
|
1
|
+
{"version":3,"file":"ApolloExpressServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,EACrC,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI1E,OAAO,kCAAkC,MAAM,sDAAsD,CAAC;AAItG,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;IAClF,MAAM,CAAC,UAAU,CACtB,iBAAiE,EACjE,aAAkD;QAElD,OAAO,IAAI,kCAAkC,CAC3C,CAAC,OAAmC,EAAQ,EAAE;YAC5C,OAAO;iBACJ,IAAI,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,CAAC;iBAC3D,MAAM,EAAE;iBACR,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,2BAA2B,CAAC;iBACjC,eAAe,CACd,CAAC,WAAgC,EAAE,EAAE,CACnC,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,CACrD,WAAW,CACZ,EACH,CAAC,gCAAgC,CAAC,CACnC;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,oCAAoC,CAAC;iBAC1C,eAAe,CACd,CAAC,UAAuB,EAAE,EAAE,CAAC;gBAC3B,GAAG,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;gBAChC,iCAAiC,CAAC,EAAE,UAAU,EAAE,CAAC;aAClD,EACD,CAAC,2BAA2B,CAAC,CAC9B;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,sCAAsC,CAAC;iBAC5C,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;YAEtD,OAAO;iBACJ,IAAI,CAAC,qCAAqC,CAAC;iBAC3C,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { type ApolloServerExpressControllerOptions } from './apollo/models/ApolloExpressControllerOptions.js';
|
|
2
2
|
export { type ApolloServerInjectOptions } from './apollo/models/ApolloServerInjectOptions.js';
|
|
3
|
-
export { httpServerServiceIdentifier } from './apollo/models/httpServerServiceIdentifier.js';
|
|
4
3
|
export { default as ApolloExpressServerContainerModule } from './apollo/modules/ApolloExpressServerContainerModule.js';
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AAC9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AAC9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
|
package/lib/esm/index.js
CHANGED
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "InversifyJs GraphQL Apollo express package",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@as-integrations/express5": "^1.1.2",
|
|
9
|
-
"@inversifyjs/apollo-core": "0.
|
|
9
|
+
"@inversifyjs/apollo-core": "0.3.0"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@inversifyjs/http-express": "4.9.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"url": "git+https://github.com/inversify/graphql.git"
|
|
54
54
|
},
|
|
55
55
|
"type": "module",
|
|
56
|
-
"version": "0.
|
|
56
|
+
"version": "0.5.0",
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsc",
|
|
59
59
|
"build:clean": "rimraf lib",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpServerServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/httpServerServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,IAAI,CAAC,MAAM,CACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpServerServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/httpServerServiceIdentifier.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,2BAA2B,GACtC,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC"}
|