@nestjs/apollo 14.0.3 → 14.1.1
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/README.md +4 -4
- package/dist/drivers/apollo-base.driver.d.ts.map +1 -1
- package/dist/drivers/apollo-base.driver.js +3 -1
- package/dist/drivers/apollo-federation.driver.d.ts +1 -0
- package/dist/drivers/apollo-federation.driver.d.ts.map +1 -1
- package/dist/drivers/apollo-federation.driver.js +4 -0
- package/dist/drivers/apollo.driver.d.ts.map +1 -1
- package/dist/drivers/apollo.driver.js +3 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
-
If you are using `express` HTTP engine, install the following packages:
|
|
29
|
+
If you are using the `express` HTTP engine, install the following packages:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
$ npm i --save @nestjs/graphql @nestjs/apollo apollo
|
|
32
|
+
$ npm i --save @nestjs/graphql @nestjs/apollo @apollo/server @as-integrations/express5 graphql
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
In case of `fastify`,
|
|
35
|
+
In case of `fastify`, install `@as-integrations/fastify` instead of `@as-integrations/express5`:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
$ npm i --save @nestjs/graphql @nestjs/apollo apollo
|
|
38
|
+
$ npm i --save @nestjs/graphql @nestjs/apollo @apollo/server @as-integrations/fastify graphql
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Quick Start
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-base.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo-base.driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAKxD,OAAO,EA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AAE,KAAK,EAC3C,GAAG,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC,KAC/C,GAAG;cAMQ,eAAe,CAC7B,OAAO,EAAE,CAAC,EACV,EAAE,YAAY,EAAE,GAAE;QAAE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;KAAO;cAmDtC,eAAe,CAC7B,OAAO,EAAE,CAAC,EACV,EAAE,YAAY,EAAE,GAAE;QAAE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;KAAO;IAwCtD,OAAO,CAAC,iCAAiC;IAyCzC,OAAO,CAAC,8BAA8B;IA4BtC,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,0BAA0B;IA0ClC,OAAO,CAAC,mBAAmB;IA+B3B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,YAAY;CAYrB"}
|
|
@@ -23,7 +23,9 @@ export class ApolloBaseDriver extends AbstractGraphQLDriver {
|
|
|
23
23
|
async start(apolloOptions) {
|
|
24
24
|
const httpAdapter = this.httpAdapterHost.httpAdapter;
|
|
25
25
|
const platformName = httpAdapter.getType();
|
|
26
|
-
|
|
26
|
+
// The requests and responses of the Node adapter (@nestjs/platform-node)
|
|
27
|
+
// carry the Express API that the Express integration of Apollo uses
|
|
28
|
+
if (platformName === 'express' || platformName === 'node') {
|
|
27
29
|
await this.registerExpress(apolloOptions);
|
|
28
30
|
}
|
|
29
31
|
else if (platformName === 'fastify') {
|
|
@@ -13,5 +13,6 @@ export declare class ApolloFederationDriver extends ApolloBaseDriver {
|
|
|
13
13
|
constructor(graphqlFederationFactory: GraphQLFederationFactory, modulesContainer: ModulesContainer);
|
|
14
14
|
start(options: ApolloDriverConfig): Promise<void>;
|
|
15
15
|
generateSchema(options: ApolloDriverConfig): Promise<GraphQLSchema>;
|
|
16
|
+
stop(): Promise<void>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=apollo-federation.driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-federation.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo-federation.driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAGL,wBAAwB,EAEzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,qBACa,sBAAuB,SAAQ,gBAAgB;IAKxD,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IAJ3C,OAAO,CAAC,oBAAoB,CAAC,CAAyB;IACtD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;gBAG7C,wBAAwB,EAAE,wBAAwB,EACnE,gBAAgB,EAAE,gBAAgB;IAMvB,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmCvD,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"apollo-federation.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo-federation.driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAGL,wBAAwB,EAEzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,qBACa,sBAAuB,SAAQ,gBAAgB;IAKxD,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IAJ3C,OAAO,CAAC,oBAAoB,CAAC,CAAyB;IACtD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;gBAG7C,wBAAwB,EAAE,wBAAwB,EACnE,gBAAgB,EAAE,gBAAgB;IAMvB,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmCvD,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI7D,IAAI;CAIlB"}
|
|
@@ -34,6 +34,10 @@ let ApolloFederationDriver = class ApolloFederationDriver extends ApolloBaseDriv
|
|
|
34
34
|
generateSchema(options) {
|
|
35
35
|
return this.graphqlFederationFactory.generateSchema(options);
|
|
36
36
|
}
|
|
37
|
+
async stop() {
|
|
38
|
+
await this._subscriptionService?.stop();
|
|
39
|
+
await super.stop();
|
|
40
|
+
}
|
|
37
41
|
};
|
|
38
42
|
ApolloFederationDriver = __decorate([
|
|
39
43
|
Injectable(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo.driver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,qBACa,YAAa,SAAQ,gBAAgB;IAChD,OAAO,CAAC,oBAAoB,CAAC,CAAyB;IACtD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;gBAEpD,gBAAgB,EAAE,gBAAgB;IAKjC,KAAK,CAAC,OAAO,EAAE,kBAAkB;IA8BjC,cAAc,CAAC,aAAa,EAAE,kBAAkB;
|
|
1
|
+
{"version":3,"file":"apollo.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo.driver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,qBACa,YAAa,SAAQ,gBAAgB;IAChD,OAAO,CAAC,oBAAoB,CAAC,CAAyB;IACtD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;gBAEpD,gBAAgB,EAAE,gBAAgB;IAKjC,KAAK,CAAC,OAAO,EAAE,kBAAkB;IA8BjC,cAAc,CAAC,aAAa,EAAE,kBAAkB;IAehD,IAAI;CAIlB"}
|
|
@@ -32,7 +32,9 @@ let ApolloDriver = class ApolloDriver extends ApolloBaseDriver {
|
|
|
32
32
|
async registerServer(apolloOptions) {
|
|
33
33
|
const httpAdapter = this.httpAdapterHost.httpAdapter;
|
|
34
34
|
const platformName = httpAdapter.getType();
|
|
35
|
-
|
|
35
|
+
// The requests and responses of the Node adapter (@nestjs/platform-node)
|
|
36
|
+
// carry the Express API that the Express integration of Apollo uses
|
|
37
|
+
if (platformName === 'express' || platformName === 'node') {
|
|
36
38
|
await this.registerExpress(apolloOptions);
|
|
37
39
|
}
|
|
38
40
|
else if (platformName === 'fastify') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/apollo",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@apollo)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,11 +38,12 @@
|
|
|
38
38
|
"@apollo/subgraph": "2.15.1",
|
|
39
39
|
"@as-integrations/express5": "^1.1.2",
|
|
40
40
|
"@as-integrations/fastify": "3.1.0",
|
|
41
|
-
"@nestjs/common": "12.
|
|
42
|
-
"@nestjs/core": "12.
|
|
43
|
-
"@nestjs/platform-express": "12.
|
|
44
|
-
"@nestjs/platform-fastify": "12.
|
|
45
|
-
"@nestjs/
|
|
41
|
+
"@nestjs/common": "12.2.0",
|
|
42
|
+
"@nestjs/core": "12.2.0",
|
|
43
|
+
"@nestjs/platform-express": "12.2.0",
|
|
44
|
+
"@nestjs/platform-fastify": "12.2.0",
|
|
45
|
+
"@nestjs/platform-node": "12.3.0",
|
|
46
|
+
"@nestjs/testing": "12.2.0",
|
|
46
47
|
"apollo-cache-inmemory": "1.6.6",
|
|
47
48
|
"apollo-client": "2.6.10"
|
|
48
49
|
},
|
|
@@ -55,7 +56,8 @@
|
|
|
55
56
|
"@apollo/gateway": "^2.0.0",
|
|
56
57
|
"@apollo/server": "^5.0.0",
|
|
57
58
|
"@apollo/subgraph": "^2.0.0",
|
|
58
|
-
"@as-integrations/
|
|
59
|
+
"@as-integrations/express5": "^1.1.2",
|
|
60
|
+
"@as-integrations/fastify": "^3.1.0",
|
|
59
61
|
"@nestjs/common": "^12.0.0",
|
|
60
62
|
"@nestjs/core": "^12.0.0",
|
|
61
63
|
"@nestjs/graphql": "^14.0.0",
|
|
@@ -75,5 +77,5 @@
|
|
|
75
77
|
"optional": true
|
|
76
78
|
}
|
|
77
79
|
},
|
|
78
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "9dd53271e78faabceeb9e2dff3436f9af3f5ae7f"
|
|
79
81
|
}
|