@tsed/typegraphql 6.95.6 → 6.95.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/package.json +4 -4
- package/lib/cjs/TypeGraphQLModule.d.ts +0 -16
- package/lib/cjs/constants/index.d.ts +0 -2
- package/lib/cjs/decorators/dataSourceService.d.ts +0 -28
- package/lib/cjs/decorators/resolverService.d.ts +0 -6
- package/lib/cjs/index.d.ts +0 -6
- package/lib/cjs/interfaces/TypeGraphQLSettings.d.ts +0 -6
- package/lib/cjs/interfaces/index.d.ts +0 -14
- package/lib/cjs/services/TypeGraphQLService.d.ts +0 -53
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/typegraphql",
|
|
3
|
-
"version": "6.95.
|
|
3
|
+
"version": "6.95.10",
|
|
4
4
|
"description": "TypeGraphQL package for Ts.ED framework, based on Apollo-server-core and Type-graphql",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"test": "cross-env NODE_ENV=test nyc mocha"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsed/apollo": "6.95.
|
|
23
|
+
"@tsed/apollo": "6.95.10",
|
|
24
24
|
"tslib": "2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tsed/common": "6.95.
|
|
28
|
-
"@tsed/core": "6.95.
|
|
27
|
+
"@tsed/common": "6.95.10",
|
|
28
|
+
"@tsed/core": "6.95.10",
|
|
29
29
|
"@types/graphql": "^14.5.0",
|
|
30
30
|
"class-validator": "~0.13.1",
|
|
31
31
|
"graphql-passport": "0.6.3",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Configuration, InjectorService } from "@tsed/di";
|
|
2
|
-
import { TypeGraphQLSettings } from "./interfaces";
|
|
3
|
-
import { TypeGraphQLService } from "./services/TypeGraphQLService";
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare class TypeGraphQLModule {
|
|
8
|
-
protected service: TypeGraphQLService;
|
|
9
|
-
protected injector: InjectorService;
|
|
10
|
-
protected configuration: Configuration;
|
|
11
|
-
get settings(): {
|
|
12
|
-
[key: string]: TypeGraphQLSettings;
|
|
13
|
-
} | undefined;
|
|
14
|
-
$onRoutesInit(): Promise<any> | void;
|
|
15
|
-
$afterListen(): Promise<any> | void;
|
|
16
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a new DataSource binded with Tsed DI.
|
|
3
|
-
*
|
|
4
|
-
* ```typescript
|
|
5
|
-
* import { DataSourceService } from "@tsed/graphql";
|
|
6
|
-
* import { RESTDataSource } from 'apollo-datasource-rest';
|
|
7
|
-
*
|
|
8
|
-
* @DataSourceService()
|
|
9
|
-
* export class MyDataSource extends RESTDataSource {
|
|
10
|
-
* constructor() {
|
|
11
|
-
* super();
|
|
12
|
-
* this.baseURL = 'https://awesome-api.example.com';
|
|
13
|
-
* }
|
|
14
|
-
*
|
|
15
|
-
* willSendRequest(request) {
|
|
16
|
-
* request.headers.set('Authorization', this.context.token);
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* getMyData(id: string) {
|
|
20
|
-
* return this.get(`/v1/my_rest_data/${id}`);
|
|
21
|
-
* }
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @decorator
|
|
26
|
-
* @graphql
|
|
27
|
-
*/
|
|
28
|
-
export declare function DataSourceService(): ClassDecorator;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ClassType } from "type-graphql";
|
|
2
|
-
import { AbstractClassOptions, ClassTypeResolver } from "type-graphql/dist/decorators/types";
|
|
3
|
-
export declare function ResolverService(): ClassDecorator;
|
|
4
|
-
export declare function ResolverService(options: AbstractClassOptions): ClassDecorator;
|
|
5
|
-
export declare function ResolverService(typeFunc: ClassTypeResolver, options?: AbstractClassOptions): ClassDecorator;
|
|
6
|
-
export declare function ResolverService(objectType: ClassType, options?: AbstractClassOptions): ClassDecorator;
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TypeGraphQLSettings } from "./TypeGraphQLSettings";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace TsED {
|
|
4
|
-
interface Configuration {
|
|
5
|
-
graphql: {
|
|
6
|
-
[key: string]: TypeGraphQLSettings;
|
|
7
|
-
};
|
|
8
|
-
typegraphql: {
|
|
9
|
-
[key: string]: TypeGraphQLSettings;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export * from "./TypeGraphQLSettings";
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ApolloService } from "@tsed/apollo";
|
|
2
|
-
import { Type } from "@tsed/core";
|
|
3
|
-
import { InjectorService } from "@tsed/di";
|
|
4
|
-
import { Logger } from "@tsed/logger";
|
|
5
|
-
import { DataSource } from "apollo-datasource";
|
|
6
|
-
import { GraphQLSchema } from "graphql";
|
|
7
|
-
import { BuildSchemaOptions } from "type-graphql";
|
|
8
|
-
import { ApolloServerBase } from "apollo-server-core";
|
|
9
|
-
import { TypeGraphQLSettings } from "../interfaces";
|
|
10
|
-
export declare class TypeGraphQLService {
|
|
11
|
-
protected injector: InjectorService;
|
|
12
|
-
protected apolloService: ApolloService;
|
|
13
|
-
protected logger: Logger;
|
|
14
|
-
/**
|
|
15
|
-
* Get an instance of ApolloServer from his id
|
|
16
|
-
* @returns ApolloServer
|
|
17
|
-
*/
|
|
18
|
-
get(id?: string): ApolloServerBase | undefined;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {string} id
|
|
22
|
-
* @returns {boolean}
|
|
23
|
-
*/
|
|
24
|
-
has(id?: string): boolean;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @returns {Promise<ApolloServer>}
|
|
28
|
-
*/
|
|
29
|
-
createServer(id: string, settings: TypeGraphQLSettings): Promise<any>;
|
|
30
|
-
/**
|
|
31
|
-
* Create a new type-graphql Schema and bind it with Ts.ED injector.
|
|
32
|
-
* @param buildSchemaOptions
|
|
33
|
-
*/
|
|
34
|
-
createSchema(buildSchemaOptions: BuildSchemaOptions): Promise<GraphQLSchema>;
|
|
35
|
-
/**
|
|
36
|
-
* Get an instance of GraphQL schema from his id
|
|
37
|
-
* @returns GraphQLSchema
|
|
38
|
-
*/
|
|
39
|
-
getSchema(id?: string): GraphQLSchema | undefined;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @returns {Provider<any>[]}
|
|
43
|
-
*/
|
|
44
|
-
protected getResolvers(): Type<any>[];
|
|
45
|
-
protected getDataSources(): Record<string, DataSource>;
|
|
46
|
-
/**
|
|
47
|
-
* create a new dataSources function to use with apollo server config
|
|
48
|
-
* @param dataSources
|
|
49
|
-
* @param serverConfigSources
|
|
50
|
-
*/
|
|
51
|
-
protected createDataSources(dataSources: Function | undefined, serverConfigSources: Function | undefined): () => any;
|
|
52
|
-
protected configureTypeGraphQLDI(): void;
|
|
53
|
-
}
|