@graphql-yoga/nestjs-federation 3.19.0 → 3.19.1-alpha-20251226100535-b4a150e85391bcccc3f1c664ec30a77b3a166db1
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 +17 -0
- package/package.json +9 -9
- package/LICENSE +0 -23
- package/dist/README.md +0 -60
- package/dist/cjs/index.js +0 -82
- package/dist/cjs/package.json +0 -1
- package/dist/esm/index.js +0 -79
- package/dist/package.json +0 -64
- package/dist/typings/index.d.cts +0 -24
- package/dist/typings/index.d.ts +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @graphql-yoga/nestjs-federation
|
|
2
2
|
|
|
3
|
+
## 3.19.1-alpha-20251226100535-b4a150e85391bcccc3f1c664ec30a77b3a166db1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4320](https://github.com/graphql-hive/graphql-yoga/pull/4320)
|
|
8
|
+
[`f8911bf`](https://github.com/graphql-hive/graphql-yoga/commit/f8911bff4be26fd85aaa505a8388b46420814b51)
|
|
9
|
+
Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - dependencies updates:
|
|
10
|
+
- Updated dependency
|
|
11
|
+
[`@envelop/apollo-federation@workspace:^` ↗︎](https://www.npmjs.com/package/@envelop/apollo-federation/v/workspace:^)
|
|
12
|
+
(from `^8.0.0`, in `dependencies`)
|
|
13
|
+
- Updated dependency
|
|
14
|
+
[`@envelop/core@workspace:^` ↗︎](https://www.npmjs.com/package/@envelop/core/v/workspace:^)
|
|
15
|
+
(from `^5.3.0`, in `dependencies`)
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
[[`f8911bf`](https://github.com/graphql-hive/graphql-yoga/commit/f8911bff4be26fd85aaa505a8388b46420814b51)]:
|
|
18
|
+
- @graphql-yoga/plugin-apollo-inline-trace@3.18.1-alpha-20251226100535-b4a150e85391bcccc3f1c664ec30a77b3a166db1
|
|
19
|
+
|
|
3
20
|
## 3.19.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-yoga/nestjs-federation",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.1-alpha-20251226100535-b4a150e85391bcccc3f1c664ec30a77b3a166db1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "GraphQL Yoga driver with Apollo Federation for NestJS GraphQL.",
|
|
6
6
|
"repository": {
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"apollo",
|
|
44
44
|
"federation"
|
|
45
45
|
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"check": "echo \"No checks specified\"; exit 0"
|
|
48
|
+
},
|
|
46
49
|
"peerDependencies": {
|
|
47
50
|
"@nestjs/common": "^11.0.0",
|
|
48
51
|
"@nestjs/core": "^11.0.0",
|
|
@@ -52,10 +55,10 @@
|
|
|
52
55
|
"dependencies": {
|
|
53
56
|
"@apollo/gateway": "^2.10.1",
|
|
54
57
|
"@apollo/subgraph": "^2.4.0",
|
|
55
|
-
"@envelop/apollo-federation": "
|
|
56
|
-
"@envelop/core": "
|
|
57
|
-
"@graphql-yoga/nestjs": "
|
|
58
|
-
"@graphql-yoga/plugin-apollo-inline-trace": "
|
|
58
|
+
"@envelop/apollo-federation": "workspace:^",
|
|
59
|
+
"@envelop/core": "workspace:^",
|
|
60
|
+
"@graphql-yoga/nestjs": "workspace:*",
|
|
61
|
+
"@graphql-yoga/plugin-apollo-inline-trace": "workspace:*"
|
|
59
62
|
},
|
|
60
63
|
"devDependencies": {
|
|
61
64
|
"@nestjs/common": "^11.0.0",
|
|
@@ -70,8 +73,5 @@
|
|
|
70
73
|
"sideEffects": false,
|
|
71
74
|
"typescript": {
|
|
72
75
|
"definition": "dist/typings/index.d.ts"
|
|
73
|
-
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"check": "echo \"No checks specified\"; exit 0"
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018-2020 Graphcool
|
|
4
|
-
Copyright (c) 2020-2021 Prisma
|
|
5
|
-
Copyright (c) 2021- The Guild
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|
package/dist/README.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<br />
|
|
3
|
-
|
|
4
|
-
<h3>
|
|
5
|
-
<a href="https://the-guild.dev/graphql/yoga-server">GraphQL Yoga</a> plugin with Apollo Federation for <a href="https://nestjs.com">NestJS</a>
|
|
6
|
-
</h3>
|
|
7
|
-
|
|
8
|
-
<h6>Fully-featured GraphQL server as a plugin for the progressive Node.js framework.</h6>
|
|
9
|
-
|
|
10
|
-
<p>
|
|
11
|
-
Check out <a href="https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nestjs">Yoga's documentation about NestJS integration</a>!
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
<br />
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
## Getting started
|
|
18
|
-
|
|
19
|
-
### Install
|
|
20
|
-
|
|
21
|
-
```shell
|
|
22
|
-
npm i @nestjs/graphql graphql-yoga graphql @graphql-yoga/nestjs-federation
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Create application module
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { YogaFederationDriver, YogaFederationDriverConfig } from '@graphql-yoga/nestjs-federation'
|
|
29
|
-
import { Module } from '@nestjs/common'
|
|
30
|
-
import { GraphQLModule } from '@nestjs/graphql'
|
|
31
|
-
|
|
32
|
-
@Module({
|
|
33
|
-
imports: [
|
|
34
|
-
GraphQLModule.forRoot<YogaFederationDriverConfig>({
|
|
35
|
-
driver: YogaFederationDriver,
|
|
36
|
-
typePaths: ['**/*.graphql']
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
})
|
|
40
|
-
export class AppModule {}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Develop GraphQL
|
|
44
|
-
|
|
45
|
-
This is just a federation and gateway driver; meaning, everything else should work as
|
|
46
|
-
[showcased in NestJS federation documentation](https://docs.nestjs.com/graphql/federation).
|
|
47
|
-
|
|
48
|
-
## Contributing
|
|
49
|
-
|
|
50
|
-
If this is your first time contributing to this project, please do read our
|
|
51
|
-
[Contributor Workflow Guide](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md)
|
|
52
|
-
before you get started off.
|
|
53
|
-
|
|
54
|
-
Feel free to open issues, pull requests and create discussions. Community support is always welcome!
|
|
55
|
-
|
|
56
|
-
## Code of Conduct
|
|
57
|
-
|
|
58
|
-
Help us keep Yoga open and inclusive. Please read and follow our
|
|
59
|
-
[Code of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted
|
|
60
|
-
from [Contributor Covenant](https://www.contributor-covenant.org/).
|
package/dist/cjs/index.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.YogaGatewayDriver = exports.YogaFederationDriver = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_1 = require("graphql");
|
|
6
|
-
const gateway_1 = require("@apollo/gateway");
|
|
7
|
-
const subgraph_1 = require("@apollo/subgraph");
|
|
8
|
-
const apollo_federation_1 = require("@envelop/apollo-federation");
|
|
9
|
-
const nestjs_1 = require("@graphql-yoga/nestjs");
|
|
10
|
-
const plugin_apollo_inline_trace_1 = require("@graphql-yoga/plugin-apollo-inline-trace");
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const graphql_2 = require("@nestjs/graphql");
|
|
13
|
-
let YogaFederationDriver = class YogaFederationDriver extends nestjs_1.AbstractYogaDriver {
|
|
14
|
-
graphqlFederationFactory;
|
|
15
|
-
subscriptionService;
|
|
16
|
-
constructor(graphqlFederationFactory) {
|
|
17
|
-
super();
|
|
18
|
-
this.graphqlFederationFactory = graphqlFederationFactory;
|
|
19
|
-
}
|
|
20
|
-
async generateSchema(options) {
|
|
21
|
-
return await this.graphqlFederationFactory.generateSchema(options);
|
|
22
|
-
}
|
|
23
|
-
async start(options) {
|
|
24
|
-
if (options.definitions?.path) {
|
|
25
|
-
if (!options.schema) {
|
|
26
|
-
throw new Error('Schema is required when providing definitions path');
|
|
27
|
-
}
|
|
28
|
-
await this.graphQlFactory.generateDefinitions((0, subgraph_1.printSubgraphSchema)(options.schema), options);
|
|
29
|
-
}
|
|
30
|
-
await super.start({
|
|
31
|
-
...options,
|
|
32
|
-
plugins: [...(options?.plugins || []), (0, plugin_apollo_inline_trace_1.useApolloInlineTrace)()],
|
|
33
|
-
});
|
|
34
|
-
if (options.subscriptions && options.schema) {
|
|
35
|
-
const config = options.subscriptions === true
|
|
36
|
-
? {
|
|
37
|
-
'graphql-ws': true,
|
|
38
|
-
}
|
|
39
|
-
: options.subscriptions;
|
|
40
|
-
this.subscriptionService = new graphql_2.GqlSubscriptionService({
|
|
41
|
-
schema: options.schema,
|
|
42
|
-
path: options.path,
|
|
43
|
-
context: options.context,
|
|
44
|
-
...config,
|
|
45
|
-
}, this.httpAdapterHost.httpAdapter?.getHttpServer());
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
async stop() {
|
|
49
|
-
await this.subscriptionService?.stop();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports.YogaFederationDriver = YogaFederationDriver;
|
|
53
|
-
exports.YogaFederationDriver = YogaFederationDriver = tslib_1.__decorate([
|
|
54
|
-
(0, common_1.Injectable)(),
|
|
55
|
-
tslib_1.__metadata("design:paramtypes", [graphql_2.GraphQLFederationFactory])
|
|
56
|
-
], YogaFederationDriver);
|
|
57
|
-
let YogaGatewayDriver = class YogaGatewayDriver extends nestjs_1.AbstractYogaDriver {
|
|
58
|
-
async generateSchema(_options) {
|
|
59
|
-
return new graphql_1.GraphQLSchema({});
|
|
60
|
-
}
|
|
61
|
-
async start(options) {
|
|
62
|
-
const { server: serverOpts = {}, gateway: gatewayOpts = {} } = options;
|
|
63
|
-
const gateway = new gateway_1.ApolloGateway(gatewayOpts);
|
|
64
|
-
await gateway.load();
|
|
65
|
-
await super.start({
|
|
66
|
-
...serverOpts,
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
68
|
-
// @ts-ignore - There is a type mismatch here
|
|
69
|
-
plugins: [...(serverOpts.plugins || []), (0, apollo_federation_1.useApolloFederation)({ gateway })],
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
async mergeDefaultOptions(options) {
|
|
73
|
-
return {
|
|
74
|
-
...options,
|
|
75
|
-
server: await super.mergeDefaultOptions(options?.['server'] ?? {}),
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
exports.YogaGatewayDriver = YogaGatewayDriver;
|
|
80
|
-
exports.YogaGatewayDriver = YogaGatewayDriver = tslib_1.__decorate([
|
|
81
|
-
(0, common_1.Injectable)()
|
|
82
|
-
], YogaGatewayDriver);
|
package/dist/cjs/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
package/dist/esm/index.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { GraphQLSchema } from 'graphql';
|
|
3
|
-
import { ApolloGateway } from '@apollo/gateway';
|
|
4
|
-
import { printSubgraphSchema } from '@apollo/subgraph';
|
|
5
|
-
import { useApolloFederation } from '@envelop/apollo-federation';
|
|
6
|
-
import { AbstractYogaDriver, } from '@graphql-yoga/nestjs';
|
|
7
|
-
import { useApolloInlineTrace } from '@graphql-yoga/plugin-apollo-inline-trace';
|
|
8
|
-
import { Injectable } from '@nestjs/common';
|
|
9
|
-
import { GqlSubscriptionService, GraphQLFederationFactory, } from '@nestjs/graphql';
|
|
10
|
-
let YogaFederationDriver = class YogaFederationDriver extends AbstractYogaDriver {
|
|
11
|
-
graphqlFederationFactory;
|
|
12
|
-
subscriptionService;
|
|
13
|
-
constructor(graphqlFederationFactory) {
|
|
14
|
-
super();
|
|
15
|
-
this.graphqlFederationFactory = graphqlFederationFactory;
|
|
16
|
-
}
|
|
17
|
-
async generateSchema(options) {
|
|
18
|
-
return await this.graphqlFederationFactory.generateSchema(options);
|
|
19
|
-
}
|
|
20
|
-
async start(options) {
|
|
21
|
-
if (options.definitions?.path) {
|
|
22
|
-
if (!options.schema) {
|
|
23
|
-
throw new Error('Schema is required when providing definitions path');
|
|
24
|
-
}
|
|
25
|
-
await this.graphQlFactory.generateDefinitions(printSubgraphSchema(options.schema), options);
|
|
26
|
-
}
|
|
27
|
-
await super.start({
|
|
28
|
-
...options,
|
|
29
|
-
plugins: [...(options?.plugins || []), useApolloInlineTrace()],
|
|
30
|
-
});
|
|
31
|
-
if (options.subscriptions && options.schema) {
|
|
32
|
-
const config = options.subscriptions === true
|
|
33
|
-
? {
|
|
34
|
-
'graphql-ws': true,
|
|
35
|
-
}
|
|
36
|
-
: options.subscriptions;
|
|
37
|
-
this.subscriptionService = new GqlSubscriptionService({
|
|
38
|
-
schema: options.schema,
|
|
39
|
-
path: options.path,
|
|
40
|
-
context: options.context,
|
|
41
|
-
...config,
|
|
42
|
-
}, this.httpAdapterHost.httpAdapter?.getHttpServer());
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async stop() {
|
|
46
|
-
await this.subscriptionService?.stop();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
YogaFederationDriver = __decorate([
|
|
50
|
-
Injectable(),
|
|
51
|
-
__metadata("design:paramtypes", [GraphQLFederationFactory])
|
|
52
|
-
], YogaFederationDriver);
|
|
53
|
-
export { YogaFederationDriver };
|
|
54
|
-
let YogaGatewayDriver = class YogaGatewayDriver extends AbstractYogaDriver {
|
|
55
|
-
async generateSchema(_options) {
|
|
56
|
-
return new GraphQLSchema({});
|
|
57
|
-
}
|
|
58
|
-
async start(options) {
|
|
59
|
-
const { server: serverOpts = {}, gateway: gatewayOpts = {} } = options;
|
|
60
|
-
const gateway = new ApolloGateway(gatewayOpts);
|
|
61
|
-
await gateway.load();
|
|
62
|
-
await super.start({
|
|
63
|
-
...serverOpts,
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
65
|
-
// @ts-ignore - There is a type mismatch here
|
|
66
|
-
plugins: [...(serverOpts.plugins || []), useApolloFederation({ gateway })],
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
async mergeDefaultOptions(options) {
|
|
70
|
-
return {
|
|
71
|
-
...options,
|
|
72
|
-
server: await super.mergeDefaultOptions(options?.['server'] ?? {}),
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
YogaGatewayDriver = __decorate([
|
|
77
|
-
Injectable()
|
|
78
|
-
], YogaGatewayDriver);
|
|
79
|
-
export { YogaGatewayDriver };
|
package/dist/package.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@graphql-yoga/nestjs-federation",
|
|
3
|
-
"version": "3.19.0",
|
|
4
|
-
"description": "GraphQL Yoga driver with Apollo Federation for NestJS GraphQL.",
|
|
5
|
-
"sideEffects": false,
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"@nestjs/common": "^11.0.0",
|
|
8
|
-
"@nestjs/core": "^11.0.0",
|
|
9
|
-
"@nestjs/graphql": "^13.0.0",
|
|
10
|
-
"graphql": "^15.0.0 || ^16.0.0"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@apollo/gateway": "^2.10.1",
|
|
14
|
-
"@apollo/subgraph": "^2.4.0",
|
|
15
|
-
"@envelop/apollo-federation": "^8.0.0",
|
|
16
|
-
"@envelop/core": "^5.3.0",
|
|
17
|
-
"@graphql-yoga/nestjs": "workspace:*",
|
|
18
|
-
"@graphql-yoga/plugin-apollo-inline-trace": "workspace:*"
|
|
19
|
-
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "https://github.com/graphql-hive/graphql-yoga.git",
|
|
23
|
-
"directory": "packages/nestjs-federation"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"graphql",
|
|
27
|
-
"server",
|
|
28
|
-
"nestjs",
|
|
29
|
-
"nest",
|
|
30
|
-
"driver",
|
|
31
|
-
"graphql-yoga",
|
|
32
|
-
"apollo",
|
|
33
|
-
"federation"
|
|
34
|
-
],
|
|
35
|
-
"author": "Denis Badurina <badurinadenis@gmail.com>",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=18.0.0"
|
|
39
|
-
},
|
|
40
|
-
"main": "cjs/index.js",
|
|
41
|
-
"module": "esm/index.js",
|
|
42
|
-
"typings": "typings/index.d.ts",
|
|
43
|
-
"typescript": {
|
|
44
|
-
"definition": "typings/index.d.ts"
|
|
45
|
-
},
|
|
46
|
-
"type": "module",
|
|
47
|
-
"exports": {
|
|
48
|
-
".": {
|
|
49
|
-
"require": {
|
|
50
|
-
"types": "./typings/index.d.cts",
|
|
51
|
-
"default": "./cjs/index.js"
|
|
52
|
-
},
|
|
53
|
-
"import": {
|
|
54
|
-
"types": "./typings/index.d.ts",
|
|
55
|
-
"default": "./esm/index.js"
|
|
56
|
-
},
|
|
57
|
-
"default": {
|
|
58
|
-
"types": "./typings/index.d.ts",
|
|
59
|
-
"default": "./esm/index.js"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"./package.json": "./package.json"
|
|
63
|
-
}
|
|
64
|
-
}
|
package/dist/typings/index.d.cts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { GatewayConfig } from '@apollo/gateway';
|
|
3
|
-
import { AbstractYogaDriver, YogaDriver, YogaDriverConfig, YogaDriverPlatform } from '@graphql-yoga/nestjs';
|
|
4
|
-
import { Type } from '@nestjs/common';
|
|
5
|
-
import { GraphQLFederationFactory } from '@nestjs/graphql';
|
|
6
|
-
export type YogaFederationDriverConfig<Platform extends YogaDriverPlatform = 'express'> = YogaDriverConfig<Platform>;
|
|
7
|
-
export declare class YogaFederationDriver<Platform extends YogaDriverPlatform = 'express'> extends AbstractYogaDriver<Platform> {
|
|
8
|
-
private readonly graphqlFederationFactory;
|
|
9
|
-
private subscriptionService?;
|
|
10
|
-
constructor(graphqlFederationFactory: GraphQLFederationFactory);
|
|
11
|
-
generateSchema(options: YogaFederationDriverConfig<Platform>): Promise<GraphQLSchema>;
|
|
12
|
-
start(options: YogaFederationDriverConfig<Platform>): Promise<void>;
|
|
13
|
-
stop(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export interface YogaGatewayDriverConfig<Platform extends YogaDriverPlatform = 'express'> {
|
|
16
|
-
driver?: Type<YogaDriver<Platform>>;
|
|
17
|
-
gateway?: GatewayConfig;
|
|
18
|
-
server?: Omit<YogaDriverConfig<Platform>, 'endpoint' | 'schema' | 'typeDefs' | 'definitions' | 'resolvers' | 'resolverValidationOptions' | 'directiveResolvers' | 'autoSchemaFile' | 'transformSchema' | 'subscriptions' | 'buildSchemaOptions' | 'fieldResolverEnhancers' | 'driver'>;
|
|
19
|
-
}
|
|
20
|
-
export declare class YogaGatewayDriver<Platform extends YogaDriverPlatform = 'express'> extends AbstractYogaDriver<Platform> {
|
|
21
|
-
generateSchema(_options: YogaGatewayDriverConfig<Platform>): Promise<GraphQLSchema>;
|
|
22
|
-
start(options: YogaGatewayDriverConfig<Platform>): Promise<void>;
|
|
23
|
-
mergeDefaultOptions(options: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
24
|
-
}
|
package/dist/typings/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
2
|
-
import { GatewayConfig } from '@apollo/gateway';
|
|
3
|
-
import { AbstractYogaDriver, YogaDriver, YogaDriverConfig, YogaDriverPlatform } from '@graphql-yoga/nestjs';
|
|
4
|
-
import { Type } from '@nestjs/common';
|
|
5
|
-
import { GraphQLFederationFactory } from '@nestjs/graphql';
|
|
6
|
-
export type YogaFederationDriverConfig<Platform extends YogaDriverPlatform = 'express'> = YogaDriverConfig<Platform>;
|
|
7
|
-
export declare class YogaFederationDriver<Platform extends YogaDriverPlatform = 'express'> extends AbstractYogaDriver<Platform> {
|
|
8
|
-
private readonly graphqlFederationFactory;
|
|
9
|
-
private subscriptionService?;
|
|
10
|
-
constructor(graphqlFederationFactory: GraphQLFederationFactory);
|
|
11
|
-
generateSchema(options: YogaFederationDriverConfig<Platform>): Promise<GraphQLSchema>;
|
|
12
|
-
start(options: YogaFederationDriverConfig<Platform>): Promise<void>;
|
|
13
|
-
stop(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export interface YogaGatewayDriverConfig<Platform extends YogaDriverPlatform = 'express'> {
|
|
16
|
-
driver?: Type<YogaDriver<Platform>>;
|
|
17
|
-
gateway?: GatewayConfig;
|
|
18
|
-
server?: Omit<YogaDriverConfig<Platform>, 'endpoint' | 'schema' | 'typeDefs' | 'definitions' | 'resolvers' | 'resolverValidationOptions' | 'directiveResolvers' | 'autoSchemaFile' | 'transformSchema' | 'subscriptions' | 'buildSchemaOptions' | 'fieldResolverEnhancers' | 'driver'>;
|
|
19
|
-
}
|
|
20
|
-
export declare class YogaGatewayDriver<Platform extends YogaDriverPlatform = 'express'> extends AbstractYogaDriver<Platform> {
|
|
21
|
-
generateSchema(_options: YogaGatewayDriverConfig<Platform>): Promise<GraphQLSchema>;
|
|
22
|
-
start(options: YogaGatewayDriverConfig<Platform>): Promise<void>;
|
|
23
|
-
mergeDefaultOptions(options: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
24
|
-
}
|