@tsed/apollo 8.0.0-alpha.1 → 8.0.0-alpha.10
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/lib/esm/ApolloModule.js +13 -8
- package/lib/esm/ApolloModule.js.map +1 -1
- package/lib/esm/constants/constants.js +1 -0
- package/lib/esm/constants/constants.js.map +1 -1
- package/lib/esm/decorators/dataSource.js +2 -2
- package/lib/esm/decorators/dataSource.js.map +1 -1
- package/lib/esm/decorators/injectApolloContext.js +19 -0
- package/lib/esm/decorators/injectApolloContext.js.map +1 -0
- package/lib/esm/index.js +5 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/AlterApolloContext.js +2 -0
- package/lib/esm/interfaces/AlterApolloContext.js.map +1 -0
- package/lib/esm/interfaces/AlterApolloServerPlugins.js +2 -0
- package/lib/esm/interfaces/AlterApolloServerPlugins.js.map +1 -0
- package/lib/esm/interfaces/AlterApolloSettings.js +2 -0
- package/lib/esm/interfaces/AlterApolloSettings.js.map +1 -0
- package/lib/esm/interfaces/ApolloContext.js +2 -0
- package/lib/esm/interfaces/ApolloContext.js.map +1 -0
- package/lib/esm/services/ApolloService.js +73 -53
- package/lib/esm/services/ApolloService.js.map +1 -1
- package/lib/types/ApolloModule.d.ts +3 -2
- package/lib/types/constants/constants.d.ts +1 -0
- package/lib/types/decorators/dataSource.d.ts +2 -2
- package/lib/types/decorators/injectApolloContext.d.ts +5 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/interfaces/AlterApolloContext.d.ts +5 -0
- package/lib/types/interfaces/AlterApolloServerPlugins.d.ts +5 -0
- package/lib/types/interfaces/AlterApolloSettings.d.ts +7 -0
- package/lib/types/interfaces/ApolloContext.d.ts +4 -0
- package/lib/types/interfaces/ApolloSettings.d.ts +22 -10
- package/lib/types/services/ApolloService.d.ts +18 -14
- package/package.json +25 -30
- package/readme.md +1 -24
- package/vitest.config.mts +4 -4
- package/.nycrc +0 -26
- package/lib/cjs/ApolloModule.js +0 -52
- package/lib/cjs/ApolloModule.js.map +0 -1
- package/lib/cjs/constants/constants.js +0 -5
- package/lib/cjs/constants/constants.js.map +0 -1
- package/lib/cjs/decorators/dataSource.js +0 -69
- package/lib/cjs/decorators/dataSource.js.map +0 -1
- package/lib/cjs/index.js +0 -12
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ApolloSettings.js +0 -3
- package/lib/cjs/interfaces/ApolloSettings.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/services/ApolloService.js +0 -169
- package/lib/cjs/services/ApolloService.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/ApolloModule.d.ts +0 -14
- package/lib/types-esm/constants/constants.d.ts +0 -1
- package/lib/types-esm/decorators/dataSource.d.ts +0 -56
- package/lib/types-esm/index.d.ts +0 -8
- package/lib/types-esm/interfaces/ApolloSettings.d.ts +0 -20
- package/lib/types-esm/services/ApolloService.d.ts +0 -49
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Logger } from "@tsed/logger";
|
|
2
|
-
import type { Config } from "apollo-server-core";
|
|
3
|
-
import { ApolloServerBase } from "apollo-server-core";
|
|
4
|
-
import type { GraphQLSchema } from "graphql";
|
|
5
|
-
import type { ApolloServer, ApolloSettings } from "../interfaces/ApolloSettings.js";
|
|
6
|
-
import { ApolloCustomServerCB } from "../interfaces/ApolloSettings.js";
|
|
7
|
-
export declare class ApolloService {
|
|
8
|
-
protected dataSources: any[];
|
|
9
|
-
platformName: string;
|
|
10
|
-
protected logger: Logger;
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @type {Map<any, any>}
|
|
14
|
-
* @private
|
|
15
|
-
*/
|
|
16
|
-
protected servers: Map<string, {
|
|
17
|
-
instance: ApolloServerBase;
|
|
18
|
-
schema: GraphQLSchema | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
private app;
|
|
21
|
-
private httpServer;
|
|
22
|
-
private httpsServer;
|
|
23
|
-
private injector;
|
|
24
|
-
constructor(dataSources: any[]);
|
|
25
|
-
createServer(id: string, settings: ApolloSettings): Promise<ApolloServer>;
|
|
26
|
-
/**
|
|
27
|
-
* Get an instance of ApolloServer from his id
|
|
28
|
-
* @returns ApolloServer
|
|
29
|
-
*/
|
|
30
|
-
get(id?: string): ApolloServerBase | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Get an instance of GraphQL schema from his id
|
|
33
|
-
* @returns GraphQLSchema
|
|
34
|
-
*/
|
|
35
|
-
getSchema(id?: string): GraphQLSchema | undefined;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param {string} id
|
|
39
|
-
* @returns {boolean}
|
|
40
|
-
*/
|
|
41
|
-
has(id?: string): boolean;
|
|
42
|
-
protected createInstance(options: Config, server?: ApolloCustomServerCB): Promise<ApolloServer | undefined>;
|
|
43
|
-
/**
|
|
44
|
-
* create a new dataSources function to use with apollo server config
|
|
45
|
-
* @param dataSources
|
|
46
|
-
*/
|
|
47
|
-
protected createDataSources(dataSources: Function | undefined): () => any;
|
|
48
|
-
private getPlugins;
|
|
49
|
-
}
|