@nest-boot/graphql 7.1.3 → 7.1.4
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,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Decorator that marks a class as a resolver arguments type.
|
|
3
3
|
*
|
|
4
|
+
* @param name - Optional GraphQL args type name. Use this for dynamically
|
|
5
|
+
* generated classes or classes whose TypeScript names are not unique.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This extends NestJS' `ArgsType` behavior by allowing an explicit GraphQL
|
|
9
|
+
* metadata name. When omitted, the class name is used, matching NestJS'
|
|
10
|
+
* default behavior.
|
|
11
|
+
*
|
|
4
12
|
* @public
|
|
5
13
|
*/
|
|
6
14
|
export declare function ArgsType(name?: string): ClassDecorator;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ArgsType = ArgsType;
|
|
4
|
-
const class_type_enum_1 = require("@nestjs/graphql/dist/enums/class-type.enum");
|
|
5
4
|
const lazy_metadata_storage_1 = require("@nestjs/graphql/dist/schema-builder/storages/lazy-metadata.storage");
|
|
6
5
|
const type_metadata_storage_1 = require("@nestjs/graphql/dist/schema-builder/storages/type-metadata.storage");
|
|
7
6
|
const add_class_type_metadata_util_1 = require("@nestjs/graphql/dist/utils/add-class-type-metadata.util");
|
|
8
7
|
/**
|
|
9
8
|
* Decorator that marks a class as a resolver arguments type.
|
|
10
9
|
*
|
|
10
|
+
* @param name - Optional GraphQL args type name. Use this for dynamically
|
|
11
|
+
* generated classes or classes whose TypeScript names are not unique.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This extends NestJS' `ArgsType` behavior by allowing an explicit GraphQL
|
|
15
|
+
* metadata name. When omitted, the class name is used, matching NestJS'
|
|
16
|
+
* default behavior.
|
|
17
|
+
*
|
|
11
18
|
* @public
|
|
12
19
|
*/
|
|
13
20
|
function ArgsType(name) {
|
|
@@ -23,7 +30,7 @@ function ArgsType(name) {
|
|
|
23
30
|
// This function must be called eagerly to allow resolvers
|
|
24
31
|
// accessing the "name" property
|
|
25
32
|
type_metadata_storage_1.TypeMetadataStorage.addArgsMetadata(metadata);
|
|
26
|
-
(0, add_class_type_metadata_util_1.addClassTypeMetadata)(target,
|
|
33
|
+
(0, add_class_type_metadata_util_1.addClassTypeMetadata)(target, "args");
|
|
27
34
|
};
|
|
28
35
|
}
|
|
29
36
|
//# sourceMappingURL=args-type.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args-type.decorator.js","sourceRoot":"","sources":["../../src/decorators/args-type.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"args-type.decorator.js","sourceRoot":"","sources":["../../src/decorators/args-type.decorator.ts"],"names":[],"mappings":";;AAiBA,4BAkBC;AAnCD,8GAAyG;AACzG,8GAAyG;AACzG,0GAA+F;AAE/F;;;;;;;;;;;;GAYG;AACH,SAAgB,QAAQ,CAAC,IAAa;IACpC,sEAAsE;IACtE,OAAO,CAAC,MAAgB,EAAE,EAAE;QAC1B,MAAM,QAAQ,GAAG;YACf,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI;YACzB,MAAM;SACP,CAAC;QACF,2CAAmB,CAAC,KAAK,CAAC,GAAG,EAAE;YAC7B,2CAAmB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QACH,0DAA0D;QAC1D,gCAAgC;QAChC,2CAAmB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAA,mDAAoB,EAClB,MAAM,EACN,MAAoD,CACrD,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|