@inversifyjs/apollo-fastify 0.2.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 +15 -0
- package/README.md +3 -0
- package/lib/esm/apollo/controllers/buildApolloServerFastifyController.d.ts +11 -0
- package/lib/esm/apollo/controllers/buildApolloServerFastifyController.d.ts.map +1 -0
- package/lib/esm/apollo/controllers/buildApolloServerFastifyController.js +42 -0
- package/lib/esm/apollo/controllers/buildApolloServerFastifyController.js.map +1 -0
- package/lib/esm/apollo/models/ApolloFastifyControllerOptions.d.ts +8 -0
- package/lib/esm/apollo/models/ApolloFastifyControllerOptions.d.ts.map +1 -0
- package/lib/esm/apollo/models/ApolloFastifyControllerOptions.js +2 -0
- package/lib/esm/apollo/models/ApolloFastifyControllerOptions.js.map +1 -0
- package/lib/esm/apollo/models/ApolloServerInjectOptions.d.ts +9 -0
- package/lib/esm/apollo/models/ApolloServerInjectOptions.d.ts.map +1 -0
- package/lib/esm/apollo/models/ApolloServerInjectOptions.js +2 -0
- package/lib/esm/apollo/models/ApolloServerInjectOptions.js.map +1 -0
- package/lib/esm/apollo/modules/ApolloFastifyServerContainerModule.d.ts +8 -0
- package/lib/esm/apollo/modules/ApolloFastifyServerContainerModule.d.ts.map +1 -0
- package/lib/esm/apollo/modules/ApolloFastifyServerContainerModule.js +37 -0
- package/lib/esm/apollo/modules/ApolloFastifyServerContainerModule.js.map +1 -0
- package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.d.ts +9 -0
- package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.d.ts.map +1 -0
- package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.js +19 -0
- package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.js.map +1 -0
- package/lib/esm/index.d.ts +4 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -0
- package/package.json +69 -0
- package/tsconfig.esm.json +10 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @inversifyjs/apollo-fastify
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Updated `InversifyApolloProvider` with generic type
|
|
8
|
+
- Added `ApolloFastifyServerContainerModule`
|
|
9
|
+
- Added `ApolloFastifyControllerOptions`
|
|
10
|
+
- Added `ApolloServerInjectOptions`
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @inversifyjs/apollo-core@0.5.0
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApolloServer, type BaseContext } from '@apollo/server';
|
|
2
|
+
import { ApolloFastifyContextFunctionArgument } from '@as-integrations/fastify';
|
|
3
|
+
import { ApolloServerController } from '@inversifyjs/apollo-core';
|
|
4
|
+
import { type FastifyInstance } from 'fastify';
|
|
5
|
+
import { Newable } from 'inversify';
|
|
6
|
+
import { ApolloFastifyControllerOptions } from '../models/ApolloFastifyControllerOptions.js';
|
|
7
|
+
export default function buildApolloServerFastifyController<TContext extends BaseContext = BaseContext>(options: ApolloFastifyControllerOptions<TContext>): Newable<ApolloServerController<TContext, [ApolloFastifyContextFunctionArgument]>, [
|
|
8
|
+
ApolloServer<TContext>,
|
|
9
|
+
FastifyInstance
|
|
10
|
+
]>;
|
|
11
|
+
//# sourceMappingURL=buildApolloServerFastifyController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildApolloServerFastifyController.d.ts","sourceRoot":"","sources":["../../../../src/apollo/controllers/buildApolloServerFastifyController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,oCAAoC,EAErC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EAEvB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAU,OAAO,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAE7F,MAAM,CAAC,OAAO,UAAU,kCAAkC,CACxD,QAAQ,SAAS,WAAW,GAAG,WAAW,EAE1C,OAAO,EAAE,8BAA8B,CAAC,QAAQ,CAAC,GAChD,OAAO,CACR,sBAAsB,CAAC,QAAQ,EAAE,CAAC,oCAAoC,CAAC,CAAC,EACxE;IAAC,YAAY,CAAC,QAAQ,CAAC;IAAE,eAAe;CAAC,CAC1C,CAwDA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { __decorate, __param } from "tslib";
|
|
2
|
+
import { fastifyApolloHandler, } from '@as-integrations/fastify';
|
|
3
|
+
import { ApolloServerController, apolloServerServiceIdentifier, } from '@inversifyjs/apollo-core';
|
|
4
|
+
import { Controller, httpApplicationServiceIdentifier, Post, Request, Response, } from '@inversifyjs/http-core';
|
|
5
|
+
import { inject } from 'inversify';
|
|
6
|
+
export default function buildApolloServerFastifyController(options) {
|
|
7
|
+
let ApolloServerFastifyController = class ApolloServerFastifyController extends ApolloServerController {
|
|
8
|
+
#fastifyInstance;
|
|
9
|
+
#middleware;
|
|
10
|
+
constructor(apolloServer, fastifyInstance) {
|
|
11
|
+
super();
|
|
12
|
+
this.#fastifyInstance = fastifyInstance;
|
|
13
|
+
this.#middleware = fastifyApolloHandler(apolloServer, {
|
|
14
|
+
context: this.#getContextFromSpreadArgs.bind(this),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async handleRequest(req, res) {
|
|
18
|
+
const result = await this.#middleware.call(this.#fastifyInstance, req, res);
|
|
19
|
+
if (!res.sent) {
|
|
20
|
+
await res.send(result);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async _getContext(arg) {
|
|
24
|
+
return options.getContext(arg);
|
|
25
|
+
}
|
|
26
|
+
async #getContextFromSpreadArgs(...args) {
|
|
27
|
+
return this._getContext(args);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
__decorate([
|
|
31
|
+
Post(),
|
|
32
|
+
__param(0, Request()),
|
|
33
|
+
__param(1, Response())
|
|
34
|
+
], ApolloServerFastifyController.prototype, "handleRequest", null);
|
|
35
|
+
ApolloServerFastifyController = __decorate([
|
|
36
|
+
Controller(options.controllerOptions),
|
|
37
|
+
__param(0, inject(apolloServerServiceIdentifier)),
|
|
38
|
+
__param(1, inject(httpApplicationServiceIdentifier))
|
|
39
|
+
], ApolloServerFastifyController);
|
|
40
|
+
return ApolloServerFastifyController;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=buildApolloServerFastifyController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildApolloServerFastifyController.js","sourceRoot":"","sources":["../../../../src/apollo/controllers/buildApolloServerFastifyController.ts"],"names":[],"mappings":";AACA,OAAO,EAEL,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,gCAAgC,EAChC,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;AAI5C,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAGxD,OAAiD;IAMjD,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,sBAG3C;QACU,gBAAgB,CAAkB;QAClC,WAAW,CAAqB;QAEzC,YAEE,YAAoC,EAEpC,eAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;YAExC,IAAI,CAAC,WAAW,GAAG,oBAAoB,CAAW,YAAY,EAAE;gBAC9D,OAAO,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;aACnD,CAAuB,CAAC;QAC3B,CAAC;QAGY,AAAN,KAAK,CAAC,aAAa,CAExB,GAAmB,EAEnB,GAAiB;YAEjB,MAAM,MAAM,GAAY,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CACjD,IAAI,CAAC,gBAAgB,EACrB,GAAG,EACH,GAAG,CACJ,CAAC;YAEF,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBACd,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;QAES,KAAK,CAAC,WAAW,CACzB,GAAyC;YAEzC,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;QAED,KAAK,CAAC,yBAAyB,CAC7B,GAAG,IAA0C;YAE7C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KACF,CAAA;IA5Bc;QADZ,IAAI,EAAE;QAEJ,WAAA,OAAO,EAAE,CAAA;QAET,WAAA,QAAQ,EAAE,CAAA;sEAYZ;IAtCG,6BAA6B;QADlC,UAAU,CAAC,OAAO,CAAC,iBAAiB,CAAC;QASjC,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;QAErC,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;OAVvC,6BAA6B,CAmDlC;IAED,OAAO,6BAA6B,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BaseContext } from '@apollo/server';
|
|
2
|
+
import { type ApolloFastifyContextFunctionArgument } from '@as-integrations/fastify';
|
|
3
|
+
import { type ControllerOptions } from '@inversifyjs/http-core';
|
|
4
|
+
export interface ApolloFastifyControllerOptions<TContext extends BaseContext> {
|
|
5
|
+
controllerOptions?: string | ControllerOptions | undefined;
|
|
6
|
+
getContext: (arg: ApolloFastifyContextFunctionArgument) => Promise<TContext>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ApolloFastifyControllerOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloFastifyControllerOptions.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/ApolloFastifyControllerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,8BAA8B,CAAC,QAAQ,SAAS,WAAW;IAC1E,iBAAiB,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;IAC3D,UAAU,EAAE,CAAC,GAAG,EAAE,oCAAoC,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloFastifyControllerOptions.js","sourceRoot":"","sources":["../../../../src/apollo/models/ApolloFastifyControllerOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ApolloServerPlugin, type BaseContext } from '@apollo/server';
|
|
2
|
+
import { type IResolvers, type TypeSource } from '@graphql-tools/utils';
|
|
3
|
+
import { type ServiceIdentifier } from 'inversify';
|
|
4
|
+
export interface ApolloServerInjectOptions<TContext extends BaseContext> {
|
|
5
|
+
plugins?: ApolloServerPlugin<TContext>[] | undefined;
|
|
6
|
+
resolverServiceIdentifier: ServiceIdentifier<IResolvers<any, TContext>>;
|
|
7
|
+
typeDefs: TypeSource;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ApolloServerInjectOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloServerInjectOptions.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/ApolloServerInjectOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,WAAW,yBAAyB,CAAC,QAAQ,SAAS,WAAW;IACrE,OAAO,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,GAAG,SAAS,CAAC;IAErD,yBAAyB,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IACxE,QAAQ,EAAE,UAAU,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloServerInjectOptions.js","sourceRoot":"","sources":["../../../../src/apollo/models/ApolloServerInjectOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BaseContext } from '@apollo/server';
|
|
2
|
+
import { ApolloServerContainerModule } from '@inversifyjs/apollo-core';
|
|
3
|
+
import { ApolloFastifyControllerOptions } from '../models/ApolloFastifyControllerOptions.js';
|
|
4
|
+
import { ApolloServerInjectOptions } from '../models/ApolloServerInjectOptions.js';
|
|
5
|
+
export default class ApolloFastifyServerContainerModule extends ApolloServerContainerModule {
|
|
6
|
+
static fromOptions<TContext extends BaseContext>(controllerOptions: ApolloFastifyControllerOptions<TContext>, serverOptions: ApolloServerInjectOptions<TContext>): ApolloFastifyServerContainerModule;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ApolloFastifyServerContainerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloFastifyServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloFastifyServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,EAM5B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;WAC3E,WAAW,CAAC,QAAQ,SAAS,WAAW,EACpD,iBAAiB,EAAE,8BAA8B,CAAC,QAAQ,CAAC,EAC3D,aAAa,EAAE,yBAAyB,CAAC,QAAQ,CAAC,GACjD,kCAAkC;CA0CtC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { fastifyApolloDrainPlugin } from '@as-integrations/fastify';
|
|
2
|
+
import { ApolloServerContainerModule, apolloServerPluginsServiceIdentifier, apolloServerResolversServiceIdentifier, apolloServerTypeDefsServiceIdentifier, httpServerServiceIdentifier, inversifyApolloProviderServiceIdentifier, } from '@inversifyjs/apollo-core';
|
|
3
|
+
import { httpApplicationServiceIdentifier } from '@inversifyjs/http-core';
|
|
4
|
+
import buildApolloServerFastifyController from '../controllers/buildApolloServerFastifyController.js';
|
|
5
|
+
import { InversifyApolloProviderImplementation } from './InversifyApolloProviderImplementation.js';
|
|
6
|
+
export default class ApolloFastifyServerContainerModule extends ApolloServerContainerModule {
|
|
7
|
+
static fromOptions(controllerOptions, serverOptions) {
|
|
8
|
+
return new ApolloFastifyServerContainerModule((options) => {
|
|
9
|
+
options
|
|
10
|
+
.bind(buildApolloServerFastifyController(controllerOptions))
|
|
11
|
+
.toSelf()
|
|
12
|
+
.inSingletonScope();
|
|
13
|
+
options
|
|
14
|
+
.bind(httpServerServiceIdentifier)
|
|
15
|
+
.toResolvedValue((instance) => instance.server, [httpApplicationServiceIdentifier])
|
|
16
|
+
.inSingletonScope();
|
|
17
|
+
options
|
|
18
|
+
.bind(apolloServerPluginsServiceIdentifier)
|
|
19
|
+
.toResolvedValue((instance) => [
|
|
20
|
+
...(serverOptions.plugins ?? []),
|
|
21
|
+
fastifyApolloDrainPlugin(instance),
|
|
22
|
+
], [httpApplicationServiceIdentifier])
|
|
23
|
+
.inSingletonScope();
|
|
24
|
+
options
|
|
25
|
+
.bind(apolloServerResolversServiceIdentifier)
|
|
26
|
+
.toService(serverOptions.resolverServiceIdentifier);
|
|
27
|
+
options
|
|
28
|
+
.bind(apolloServerTypeDefsServiceIdentifier)
|
|
29
|
+
.toConstantValue(serverOptions.typeDefs);
|
|
30
|
+
options
|
|
31
|
+
.bind(inversifyApolloProviderServiceIdentifier)
|
|
32
|
+
.to(InversifyApolloProviderImplementation)
|
|
33
|
+
.inSingletonScope();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=ApolloFastifyServerContainerModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloFastifyServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloFastifyServerContainerModule.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,EACrC,2BAA2B,EAC3B,wCAAwC,GACzC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI1E,OAAO,kCAAkC,MAAM,sDAAsD,CAAC;AAGtG,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;IAClF,MAAM,CAAC,WAAW,CACvB,iBAA2D,EAC3D,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,QAAyB,EAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,EAC3D,CAAC,gCAAgC,CAAC,CACnC;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,oCAAoC,CAAC;iBAC1C,eAAe,CACd,CAAC,QAAyB,EAAE,EAAE,CAAC;gBAC7B,GAAG,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;gBAChC,wBAAwB,CAAC,QAAQ,CAAC;aACnC,EACD,CAAC,gCAAgC,CAAC,CACnC;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;YAE3C,OAAO;iBACJ,IAAI,CAAC,wCAAwC,CAAC;iBAC9C,EAAE,CAAC,qCAAqC,CAAC;iBACzC,gBAAgB,EAAE,CAAC;QACxB,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ApolloServer } from '@apollo/server';
|
|
2
|
+
import { InversifyApolloProvider } from '@inversifyjs/apollo-core';
|
|
3
|
+
import { type FastifyInstance } from 'fastify';
|
|
4
|
+
export declare class InversifyApolloProviderImplementation implements InversifyApolloProvider<FastifyInstance> {
|
|
5
|
+
readonly apolloServer: ApolloServer<any>;
|
|
6
|
+
readonly server: FastifyInstance;
|
|
7
|
+
constructor(apolloServer: ApolloServer<any>, server: FastifyInstance);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=InversifyApolloProviderImplementation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InversifyApolloProviderImplementation.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/InversifyApolloProviderImplementation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAEL,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,qBACa,qCAAsC,YAAW,uBAAuB,CAAC,eAAe,CAAC;aAKlF,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC;aAE/B,MAAM,EAAE,eAAe;gBAFvB,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,EAE/B,MAAM,EAAE,eAAe;CAE1C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __decorate, __param } from "tslib";
|
|
2
|
+
import { apolloServerServiceIdentifier, } from '@inversifyjs/apollo-core';
|
|
3
|
+
import { httpApplicationServiceIdentifier } from '@inversifyjs/http-core';
|
|
4
|
+
import { inject, injectable } from 'inversify';
|
|
5
|
+
let InversifyApolloProviderImplementation = class InversifyApolloProviderImplementation {
|
|
6
|
+
apolloServer;
|
|
7
|
+
server;
|
|
8
|
+
constructor(apolloServer, server) {
|
|
9
|
+
this.apolloServer = apolloServer;
|
|
10
|
+
this.server = server;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
InversifyApolloProviderImplementation = __decorate([
|
|
14
|
+
injectable(),
|
|
15
|
+
__param(0, inject(apolloServerServiceIdentifier)),
|
|
16
|
+
__param(1, inject(httpApplicationServiceIdentifier))
|
|
17
|
+
], InversifyApolloProviderImplementation);
|
|
18
|
+
export { InversifyApolloProviderImplementation };
|
|
19
|
+
//# sourceMappingURL=InversifyApolloProviderImplementation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InversifyApolloProviderImplementation.js","sourceRoot":"","sources":["../../../../src/apollo/modules/InversifyApolloProviderImplementation.ts"],"names":[],"mappings":";AACA,OAAO,EACL,6BAA6B,GAE9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGxC,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAK9B;IAEA;IANlB,YAIkB,YAA+B,EAE/B,MAAuB;QAFvB,iBAAY,GAAZ,YAAY,CAAmB;QAE/B,WAAM,GAAN,MAAM,CAAiB;IACtC,CAAC;CACL,CAAA;AATY,qCAAqC;IADjD,UAAU,EAAE;IAIR,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;IAGrC,WAAA,MAAM,CAAC,gCAAgC,CAAC,CAAA;GANhC,qCAAqC,CASjD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as ApolloFastifyServerContainerModule } from './apollo/modules/ApolloFastifyServerContainerModule.js';
|
|
2
|
+
export { type ApolloFastifyControllerOptions } from './apollo/models/ApolloFastifyControllerOptions.js';
|
|
3
|
+
export { type ApolloServerInjectOptions } from './apollo/models/ApolloServerInjectOptions.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,8CAA8C,CAAC"}
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Roberto Pintos López",
|
|
3
|
+
"bugs": {
|
|
4
|
+
"url": "https://github.com/inversify/graphql/issues"
|
|
5
|
+
},
|
|
6
|
+
"description": "InversifyJs GraphQL Apollo fastify package",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@as-integrations/fastify": "^3.1.0",
|
|
9
|
+
"@inversifyjs/apollo-core": "0.5.0"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@inversifyjs/http-fastify": "4.9.1",
|
|
13
|
+
"@graphql-tools/utils": "10.11.0",
|
|
14
|
+
"@types/node": "24.10.4",
|
|
15
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
16
|
+
"eslint": "9.39.2",
|
|
17
|
+
"fastify": "5.6.2",
|
|
18
|
+
"prettier": "3.7.4",
|
|
19
|
+
"rimraf": "6.1.2",
|
|
20
|
+
"tslib": "2.8.1",
|
|
21
|
+
"typescript": "5.9.3",
|
|
22
|
+
"vitest": "4.0.16"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://inversify.io/framework/",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"apollo",
|
|
27
|
+
"inversify",
|
|
28
|
+
"graphql",
|
|
29
|
+
"http",
|
|
30
|
+
"node",
|
|
31
|
+
"typescript"
|
|
32
|
+
],
|
|
33
|
+
"devEngines": {
|
|
34
|
+
"node": "^24.10.0",
|
|
35
|
+
"pnpm": "^10.13.1"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"module": "lib/esm/index.js",
|
|
39
|
+
"exports": {
|
|
40
|
+
".": "./lib/esm/index.js"
|
|
41
|
+
},
|
|
42
|
+
"name": "@inversifyjs/apollo-fastify",
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@apollo/server": "^5.2.0",
|
|
45
|
+
"@inversifyjs/http-core": "^4.9.1",
|
|
46
|
+
"inversify": "^7.10.8"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/inversify/graphql.git"
|
|
54
|
+
},
|
|
55
|
+
"type": "module",
|
|
56
|
+
"version": "0.2.0",
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsc",
|
|
59
|
+
"build:clean": "rimraf lib",
|
|
60
|
+
"format": "prettier --write ./src",
|
|
61
|
+
"lint": "eslint ./src",
|
|
62
|
+
"prebuild": "pnpm run build:clean",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:integration": "pnpm run test --project Integration",
|
|
65
|
+
"test:coverage": "pnpm run test:unit --coverage",
|
|
66
|
+
"test:uncommitted": "pnpm run test --changed=HEAD",
|
|
67
|
+
"test:unit": "pnpm run test --project Unit"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "@inversifyjs/foundation-typescript-config/tsconfig.base.esm.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./lib/esm",
|
|
6
|
+
"rootDir": "./src",
|
|
7
|
+
"tsBuildInfoFile": "tsconfig.tsbuildinfo"
|
|
8
|
+
},
|
|
9
|
+
"include": ["src"]
|
|
10
|
+
}
|