@inversifyjs/apollo-core 0.2.0 → 0.4.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/esm/apollo/models/apolloServerGraphqlServiceIdentifier.d.ts +4 -0
  3. package/lib/esm/apollo/models/apolloServerGraphqlServiceIdentifier.d.ts.map +1 -0
  4. package/lib/esm/apollo/models/apolloServerGraphqlServiceIdentifier.js +2 -0
  5. package/lib/esm/apollo/models/apolloServerGraphqlServiceIdentifier.js.map +1 -0
  6. package/lib/esm/apollo/models/apolloServerPluginsServiceIdentifier.d.ts +1 -1
  7. package/lib/esm/apollo/models/apolloServerPluginsServiceIdentifier.d.ts.map +1 -1
  8. package/lib/esm/apollo/models/apolloServerServiceIdentifier.d.ts +1 -1
  9. package/lib/esm/apollo/models/apolloServerServiceIdentifier.d.ts.map +1 -1
  10. package/lib/esm/apollo/models/apolloServerServiceIdentifier.js.map +1 -1
  11. package/lib/esm/apollo/models/httpServerServiceIdentifier.d.ts +4 -0
  12. package/lib/esm/apollo/models/httpServerServiceIdentifier.d.ts.map +1 -0
  13. package/lib/esm/apollo/models/httpServerServiceIdentifier.js +2 -0
  14. package/lib/esm/apollo/models/httpServerServiceIdentifier.js.map +1 -0
  15. package/lib/esm/apollo/models/inversifyApolloProviderServiceIdentifier.d.ts +4 -0
  16. package/lib/esm/apollo/models/inversifyApolloProviderServiceIdentifier.d.ts.map +1 -0
  17. package/lib/esm/apollo/models/inversifyApolloProviderServiceIdentifier.js +2 -0
  18. package/lib/esm/apollo/models/inversifyApolloProviderServiceIdentifier.js.map +1 -0
  19. package/lib/esm/apollo/modules/ApolloServerContainerModule.d.ts.map +1 -1
  20. package/lib/esm/apollo/modules/ApolloServerContainerModule.js +24 -8
  21. package/lib/esm/apollo/modules/ApolloServerContainerModule.js.map +1 -1
  22. package/lib/esm/apollo/modules/InversifyApolloProvider.d.ts +7 -0
  23. package/lib/esm/apollo/modules/InversifyApolloProvider.d.ts.map +1 -0
  24. package/lib/esm/apollo/modules/InversifyApolloProvider.js +2 -0
  25. package/lib/esm/apollo/modules/InversifyApolloProvider.js.map +1 -0
  26. package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.d.ts +9 -0
  27. package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.d.ts.map +1 -0
  28. package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.js +19 -0
  29. package/lib/esm/apollo/modules/InversifyApolloProviderImplementation.js.map +1 -0
  30. package/lib/esm/index.d.ts +4 -0
  31. package/lib/esm/index.d.ts.map +1 -1
  32. package/lib/esm/index.js +3 -0
  33. package/lib/esm/index.js.map +1 -1
  34. package/package.json +5 -2
  35. package/lib/esm/apollo/modules/ApolloServerContainerModule.spec.d.ts +0 -2
  36. package/lib/esm/apollo/modules/ApolloServerContainerModule.spec.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @inversifyjs/apollo-core
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added `InversifyApolloProvider`
8
+ - Added `inversifyApolloProviderServiceIdentifier`
9
+
10
+ ## 0.3.0
11
+
12
+ ### Minor Changes
13
+
14
+ - Updated `apolloServerPluginsServiceIdentifier` to be a plugin array service identifier
15
+ - Added `apolloServerGraphqlServiceIdentifier`
16
+ - Added `httpServerServiceIdentifier`
17
+
3
18
  ## 0.2.0
4
19
 
5
20
  ### Minor Changes
@@ -0,0 +1,4 @@
1
+ import { type GraphQLSchema } from 'graphql';
2
+ import { type ServiceIdentifier } from 'inversify';
3
+ export declare const apolloServerGraphqlServiceIdentifier: ServiceIdentifier<GraphQLSchema>;
4
+ //# sourceMappingURL=apolloServerGraphqlServiceIdentifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apolloServerGraphqlServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerGraphqlServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,oCAAoC,EAAE,iBAAiB,CAAC,aAAa,CACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const apolloServerGraphqlServiceIdentifier = Symbol.for('@inversifyjs/apollo-core/ApolloServerGraphql');
2
+ //# sourceMappingURL=apolloServerGraphqlServiceIdentifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apolloServerGraphqlServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerGraphqlServiceIdentifier.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,oCAAoC,GAC/C,MAAM,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { type ApolloServerPlugin } from '@apollo/server';
2
2
  import { type ServiceIdentifier } from 'inversify';
3
- export declare const apolloServerPluginsServiceIdentifier: ServiceIdentifier<ApolloServerPlugin<any>[] | undefined>;
3
+ export declare const apolloServerPluginsServiceIdentifier: ServiceIdentifier<ApolloServerPlugin<any>[]>;
4
4
  //# sourceMappingURL=apolloServerPluginsServiceIdentifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apolloServerPluginsServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerPluginsServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,oCAAoC,EAAE,iBAAiB,CAElE,kBAAkB,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CACuB,CAAC"}
1
+ {"version":3,"file":"apolloServerPluginsServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerPluginsServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,oCAAoC,EAAE,iBAAiB,CAElE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CACmC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { type ApolloServer } from '@apollo/server';
2
2
  import { type ServiceIdentifier } from 'inversify';
3
- export declare const apolloServerServiceIdentifier: ServiceIdentifier<ApolloServer>;
3
+ export declare const apolloServerServiceIdentifier: ServiceIdentifier<ApolloServer<any>>;
4
4
  //# sourceMappingURL=apolloServerServiceIdentifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apolloServerServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,CAAC,YAAY,CACrB,CAAC"}
1
+ {"version":3,"file":"apolloServerServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,CAE3D,YAAY,CAAC,GAAG,CAAC,CACoC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apolloServerServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerServiceIdentifier.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,6BAA6B,GACxC,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC"}
1
+ {"version":3,"file":"apolloServerServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/apolloServerServiceIdentifier.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,6BAA6B,GAGtC,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type http from 'node:http';
2
+ import { type ServiceIdentifier } from 'inversify';
3
+ export declare const httpServerServiceIdentifier: ServiceIdentifier<http.Server>;
4
+ //# sourceMappingURL=httpServerServiceIdentifier.d.ts.map
@@ -0,0 +1 @@
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,CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const httpServerServiceIdentifier = Symbol.for('@inversifyjs/apollo-core/HttpServer');
2
+ //# sourceMappingURL=httpServerServiceIdentifier.js.map
@@ -0,0 +1 @@
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,qCAAqC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ServiceIdentifier } from 'inversify';
2
+ import { type InversifyApolloProvider } from '../modules/InversifyApolloProvider.js';
3
+ export declare const inversifyApolloProviderServiceIdentifier: ServiceIdentifier<InversifyApolloProvider>;
4
+ //# sourceMappingURL=inversifyApolloProviderServiceIdentifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inversifyApolloProviderServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/inversifyApolloProviderServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAErF,eAAO,MAAM,wCAAwC,EAAE,iBAAiB,CAAC,uBAAuB,CAChC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const inversifyApolloProviderServiceIdentifier = Symbol.for('@inversifyjs/apollo-core/InversifyApolloProvider');
2
+ //# sourceMappingURL=inversifyApolloProviderServiceIdentifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inversifyApolloProviderServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/inversifyApolloProviderServiceIdentifier.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,wCAAwC,GACnD,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAO7E,qBAAa,2BAA4B,SAAQ,eAAe;gBAE5D,IAAI,CAAC,EACD,CAAC,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC/D,SAAS;CAgChB"}
1
+ {"version":3,"file":"ApolloServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloServerContainerModule.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,KAAK,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAU7E,qBAAa,2BAA4B,SAAQ,eAAe;gBAE5D,IAAI,CAAC,EACD,CAAC,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC/D,SAAS;CAgDhB"}
@@ -1,28 +1,44 @@
1
1
  import { ApolloServer } from '@apollo/server';
2
+ import { makeExecutableSchema } from '@graphql-tools/schema';
2
3
  import { ContainerModule } from 'inversify';
4
+ import { apolloServerGraphqlServiceIdentifier } from '../models/apolloServerGraphqlServiceIdentifier.js';
3
5
  import { apolloServerPluginsServiceIdentifier } from '../models/apolloServerPluginsServiceIdentifier.js';
4
6
  import { apolloServerResolversServiceIdentifier } from '../models/apolloServerResolversServiceIdentifier.js';
5
7
  import { apolloServerServiceIdentifier } from '../models/apolloServerServiceIdentifier.js';
6
8
  import { apolloServerTypeDefsServiceIdentifier } from '../models/apolloServerTypeDefsServiceIdentifier.js';
9
+ import { inversifyApolloProviderServiceIdentifier } from '../models/inversifyApolloProviderServiceIdentifier.js';
10
+ import { InversifyApolloProviderImplementation } from './InversifyApolloProviderImplementation.js';
7
11
  export class ApolloServerContainerModule extends ContainerModule {
8
12
  constructor(load) {
9
13
  super((options) => {
10
- options.bind(apolloServerServiceIdentifier).toResolvedValue(async (plugins, resolvers, typeDefs) => {
14
+ options
15
+ .bind(apolloServerGraphqlServiceIdentifier)
16
+ .toResolvedValue((resolvers, typeDefs) => makeExecutableSchema({ resolvers, typeDefs }), [
17
+ apolloServerResolversServiceIdentifier,
18
+ apolloServerTypeDefsServiceIdentifier,
19
+ ])
20
+ .inSingletonScope();
21
+ options
22
+ .bind(apolloServerServiceIdentifier)
23
+ .toResolvedValue(async (plugins, schema) => {
11
24
  const apolloServer = new ApolloServer({
12
- plugins: plugins ?? [],
13
- resolvers,
14
- typeDefs,
25
+ plugins: plugins.flat(),
26
+ schema,
15
27
  });
16
28
  await apolloServer.start();
17
29
  return apolloServer;
18
30
  }, [
19
31
  {
20
- optional: true,
32
+ isMultiple: true,
21
33
  serviceIdentifier: apolloServerPluginsServiceIdentifier,
22
34
  },
23
- apolloServerResolversServiceIdentifier,
24
- apolloServerTypeDefsServiceIdentifier,
25
- ]);
35
+ apolloServerGraphqlServiceIdentifier,
36
+ ])
37
+ .inSingletonScope();
38
+ options
39
+ .bind(inversifyApolloProviderServiceIdentifier)
40
+ .to(InversifyApolloProviderImplementation)
41
+ .inSingletonScope();
26
42
  return load?.(options);
27
43
  });
28
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAmC,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAE,sCAAsC,EAAE,MAAM,qDAAqD,CAAC;AAC7G,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAE3G,MAAM,OAAO,2BAA4B,SAAQ,eAAe;IAC9D,YACE,IAEa;QAEb,KAAK,CAAC,CAAC,OAAmC,EAAwB,EAAE;YAClE,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,eAAe,CACzD,KAAK,EACH,OAAyC,EACzC,SAAqB,EACrB,QAAoB,EACG,EAAE;gBACzB,MAAM,YAAY,GAAiB,IAAI,YAAY,CAAC;oBAClD,OAAO,EAAE,OAAO,IAAI,EAAE;oBACtB,SAAS;oBACT,QAAQ;iBACT,CAAC,CAAC;gBAEH,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;gBAE3B,OAAO,YAAY,CAAC;YACtB,CAAC,EACD;gBACE;oBACE,QAAQ,EAAE,IAAI;oBACd,iBAAiB,EAAE,oCAAoC;iBACxD;gBACD,sCAAsC;gBACtC,qCAAqC;aACtC,CACF,CAAC;YAEF,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"ApolloServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAmC,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAE,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAE,sCAAsC,EAAE,MAAM,qDAAqD,CAAC;AAC7G,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,wCAAwC,EAAE,MAAM,uDAAuD,CAAC;AACjH,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,MAAM,OAAO,2BAA4B,SAAQ,eAAe;IAC9D,YACE,IAEa;QAEb,KAAK,CAAC,CAAC,OAAmC,EAAwB,EAAE;YAClE,OAAO;iBACJ,IAAI,CAAC,oCAAoC,CAAC;iBAC1C,eAAe,CACd,CAAC,SAAqB,EAAE,QAAoB,EAAiB,EAAE,CAC7D,oBAAoB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAC/C;gBACE,sCAAsC;gBACtC,qCAAqC;aACtC,CACF;iBACA,gBAAgB,EAAE,CAAC;YACtB,OAAO;iBACJ,IAAI,CAAC,6BAA6B,CAAC;iBACnC,eAAe,CACd,KAAK,EACH,OAA+B,EAC/B,MAAqB,EACE,EAAE;gBACzB,MAAM,YAAY,GAAiB,IAAI,YAAY,CAAC;oBAClD,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;oBACvB,MAAM;iBACP,CAAC,CAAC;gBAEH,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;gBAE3B,OAAO,YAAY,CAAC;YACtB,CAAC,EACD;gBACE;oBACE,UAAU,EAAE,IAAI;oBAChB,iBAAiB,EAAE,oCAAoC;iBACxD;gBACD,oCAAoC;aACrC,CACF;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,wCAAwC,CAAC;iBAC9C,EAAE,CAAC,qCAAqC,CAAC;iBACzC,gBAAgB,EAAE,CAAC;YAEtB,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import type http from 'node:http';
2
+ import { type ApolloServer } from '@apollo/server';
3
+ export interface InversifyApolloProvider {
4
+ readonly apolloServer: ApolloServer<any>;
5
+ readonly httpServer: http.Server;
6
+ }
7
+ //# sourceMappingURL=InversifyApolloProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InversifyApolloProvider.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/InversifyApolloProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,uBAAuB;IAEtC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAEzC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=InversifyApolloProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InversifyApolloProvider.js","sourceRoot":"","sources":["../../../../src/apollo/modules/InversifyApolloProvider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type http from 'node:http';
2
+ import { type ApolloServer } from '@apollo/server';
3
+ import { type InversifyApolloProvider } from './InversifyApolloProvider.js';
4
+ export declare class InversifyApolloProviderImplementation implements InversifyApolloProvider {
5
+ readonly apolloServer: ApolloServer<any>;
6
+ readonly httpServer: http.Server;
7
+ constructor(apolloServer: ApolloServer<any>, httpServer: http.Server);
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,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,qBACa,qCAAsC,YAAW,uBAAuB;aAGjE,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC;aAE/B,UAAU,EAAE,IAAI,CAAC,MAAM;gBAFvB,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,EAE/B,UAAU,EAAE,IAAI,CAAC,MAAM;CAE1C"}
@@ -0,0 +1,19 @@
1
+ import { __decorate, __param } from "tslib";
2
+ import { inject, injectable } from 'inversify';
3
+ import { apolloServerServiceIdentifier } from '../models/apolloServerServiceIdentifier.js';
4
+ import { httpServerServiceIdentifier } from '../models/httpServerServiceIdentifier.js';
5
+ let InversifyApolloProviderImplementation = class InversifyApolloProviderImplementation {
6
+ apolloServer;
7
+ httpServer;
8
+ constructor(apolloServer, httpServer) {
9
+ this.apolloServer = apolloServer;
10
+ this.httpServer = httpServer;
11
+ }
12
+ };
13
+ InversifyApolloProviderImplementation = __decorate([
14
+ injectable(),
15
+ __param(0, inject(apolloServerServiceIdentifier)),
16
+ __param(1, inject(httpServerServiceIdentifier))
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":";AAGA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAIhF,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAG9B;IAEA;IAJlB,YAEkB,YAA+B,EAE/B,UAAuB;QAFvB,iBAAY,GAAZ,YAAY,CAAmB;QAE/B,eAAU,GAAV,UAAU,CAAa;IACtC,CAAC;CACL,CAAA;AAPY,qCAAqC;IADjD,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,6BAA6B,CAAC,CAAA;IAErC,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;GAJ3B,qCAAqC,CAOjD"}
@@ -1,7 +1,11 @@
1
1
  export { ApolloServerController } from './apollo/controllers/ApolloServerController.js';
2
+ export { apolloServerGraphqlServiceIdentifier } from './apollo/models/apolloServerGraphqlServiceIdentifier.js';
2
3
  export { apolloServerPluginsServiceIdentifier } from './apollo/models/apolloServerPluginsServiceIdentifier.js';
3
4
  export { apolloServerResolversServiceIdentifier } from './apollo/models/apolloServerResolversServiceIdentifier.js';
4
5
  export { apolloServerTypeDefsServiceIdentifier } from './apollo/models/apolloServerTypeDefsServiceIdentifier.js';
5
6
  export { apolloServerServiceIdentifier } from './apollo/models/apolloServerServiceIdentifier.js';
7
+ export { httpServerServiceIdentifier } from './apollo/models/httpServerServiceIdentifier.js';
8
+ export { inversifyApolloProviderServiceIdentifier } from './apollo/models/inversifyApolloProviderServiceIdentifier.js';
6
9
  export { ApolloServerContainerModule } from './apollo/modules/ApolloServerContainerModule.js';
10
+ export { type InversifyApolloProvider } from './apollo/modules/InversifyApolloProvider.js';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,qCAAqC,EAAE,MAAM,0DAA0D,CAAC;AACjH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,qCAAqC,EAAE,MAAM,0DAA0D,CAAC;AACjH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,6CAA6C,CAAC"}
package/lib/esm/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  export { ApolloServerController } from './apollo/controllers/ApolloServerController.js';
2
+ export { apolloServerGraphqlServiceIdentifier } from './apollo/models/apolloServerGraphqlServiceIdentifier.js';
2
3
  export { apolloServerPluginsServiceIdentifier } from './apollo/models/apolloServerPluginsServiceIdentifier.js';
3
4
  export { apolloServerResolversServiceIdentifier } from './apollo/models/apolloServerResolversServiceIdentifier.js';
4
5
  export { apolloServerTypeDefsServiceIdentifier } from './apollo/models/apolloServerTypeDefsServiceIdentifier.js';
5
6
  export { apolloServerServiceIdentifier } from './apollo/models/apolloServerServiceIdentifier.js';
7
+ export { httpServerServiceIdentifier } from './apollo/models/httpServerServiceIdentifier.js';
8
+ export { inversifyApolloProviderServiceIdentifier } from './apollo/models/inversifyApolloProviderServiceIdentifier.js';
6
9
  export { ApolloServerContainerModule } from './apollo/modules/ApolloServerContainerModule.js';
7
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,qCAAqC,EAAE,MAAM,0DAA0D,CAAC;AACjH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,qCAAqC,EAAE,MAAM,0DAA0D,CAAC;AACjH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC"}
package/package.json CHANGED
@@ -4,12 +4,15 @@
4
4
  "url": "https://github.com/inversify/graphql/issues"
5
5
  },
6
6
  "description": "InversifyJs GraphQL Apollo core package",
7
- "dependencies": {},
7
+ "dependencies": {
8
+ "@graphql-tools/schema": "^10.0.30"
9
+ },
8
10
  "devDependencies": {
9
11
  "@graphql-tools/utils": "10.11.0",
10
12
  "@types/node": "24.10.4",
11
13
  "@vitest/coverage-v8": "4.0.16",
12
14
  "eslint": "9.39.2",
15
+ "graphql": "16.12.0",
13
16
  "prettier": "3.7.4",
14
17
  "rimraf": "6.1.2",
15
18
  "tslib": "2.8.1",
@@ -47,7 +50,7 @@
47
50
  "url": "git+https://github.com/inversify/graphql.git"
48
51
  },
49
52
  "type": "module",
50
- "version": "0.2.0",
53
+ "version": "0.4.0",
51
54
  "scripts": {
52
55
  "build": "tsc",
53
56
  "build:clean": "rimraf lib",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ApolloServerContainerModule.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApolloServerContainerModule.spec.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloServerContainerModule.spec.ts"],"names":[],"mappings":""}