@rxdi/graphql 0.7.180 → 0.7.181
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.
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { GraphQLInputFieldConfigMap } from "graphql";
|
|
2
|
+
export declare function Mutation(input?: GraphQLInputFieldConfigMap, meta?: Pick<GraphQLInputFieldConfigMap, 'description'>): (t: any, propKey: string, descriptor: TypedPropertyDescriptor<any>) => TypedPropertyDescriptor<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Mutation = void 0;
|
|
4
|
-
function Mutation(
|
|
4
|
+
function Mutation(input, meta) {
|
|
5
5
|
return (t, propKey, descriptor) => {
|
|
6
6
|
const originalMethod = descriptor.value;
|
|
7
7
|
const target = t;
|
|
@@ -9,9 +9,10 @@ function Mutation(options) {
|
|
|
9
9
|
descriptor.value = function (...args) {
|
|
10
10
|
const returnValue = Object.create({});
|
|
11
11
|
returnValue.resolve = originalMethod;
|
|
12
|
-
returnValue.args =
|
|
12
|
+
returnValue.args = input ? input : null;
|
|
13
13
|
returnValue.method_type = 'mutation';
|
|
14
14
|
returnValue.method_name = propertyKey;
|
|
15
|
+
returnValue.description = meta ? meta.description : null;
|
|
15
16
|
returnValue.target = target;
|
|
16
17
|
return returnValue;
|
|
17
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphQLObjectType, GraphQLNonNull } from 'graphql';
|
|
1
|
+
import { GraphQLObjectType, GraphQLNonNull, GraphQLInputFieldConfigMap } from 'graphql';
|
|
2
2
|
import { GraphQLControllerOptions } from '../../decorators/guard/guard.interface';
|
|
3
3
|
export declare class GenericGapiResolversType implements GraphQLControllerOptions {
|
|
4
4
|
scope?: string[];
|
|
@@ -9,6 +9,7 @@ export declare class GenericGapiResolversType implements GraphQLControllerOption
|
|
|
9
9
|
interceptor?: Function;
|
|
10
10
|
interceptors?: any[];
|
|
11
11
|
method_name?: string;
|
|
12
|
+
description?: string;
|
|
12
13
|
subscribe?: (root: any, params: any, context: any, info: any, ...args: any[]) => {};
|
|
13
14
|
method_type?: 'query' | 'subscription' | 'mutation' | 'event';
|
|
14
15
|
type: GraphQLObjectType;
|
|
@@ -19,4 +20,4 @@ export declare class GenericGapiResolversType implements GraphQLControllerOption
|
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
|
-
export declare function Query<T>(options?:
|
|
23
|
+
export declare function Query<T>(options?: GraphQLInputFieldConfigMap, meta?: Pick<GraphQLInputFieldConfigMap, 'description'>): (t: any, propKey: any, descriptor: TypedPropertyDescriptor<any>) => TypedPropertyDescriptor<any>;
|
|
@@ -4,7 +4,7 @@ exports.Query = exports.GenericGapiResolversType = void 0;
|
|
|
4
4
|
class GenericGapiResolversType {
|
|
5
5
|
}
|
|
6
6
|
exports.GenericGapiResolversType = GenericGapiResolversType;
|
|
7
|
-
function Query(options) {
|
|
7
|
+
function Query(options, meta) {
|
|
8
8
|
return (t, propKey, descriptor) => {
|
|
9
9
|
const originalMethod = descriptor.value;
|
|
10
10
|
const target = t;
|
|
@@ -15,6 +15,7 @@ function Query(options) {
|
|
|
15
15
|
returnValue.args = options ? options : null;
|
|
16
16
|
returnValue.method_type = 'query';
|
|
17
17
|
returnValue.method_name = propertyKey;
|
|
18
|
+
returnValue.description = meta ? meta.description : null;
|
|
18
19
|
returnValue.target = target;
|
|
19
20
|
return returnValue;
|
|
20
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdi/graphql",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.181",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rxdi/graphql"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"graphql": "^14.5.8",
|
|
43
|
-
"@rxdi/core": "^0.7.
|
|
44
|
-
"@rxdi/hapi": "^0.7.
|
|
43
|
+
"@rxdi/core": "^0.7.180",
|
|
44
|
+
"@rxdi/hapi": "^0.7.180",
|
|
45
45
|
"@types/graphql": "^14.5.0",
|
|
46
46
|
"@types/jest": "^24.0.22",
|
|
47
47
|
"@types/node": "^12.0.10",
|