@rytass/cms-base-nestjs-graphql-module 0.0.3 → 0.0.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.
- package/cms-base-graphql.module.js +0 -6
- package/dto/article-backstage-collection.dto.d.ts +5 -0
- package/dto/article-backstage-collection.dto.js +27 -0
- package/dto/article-backstage.dto.d.ts +2 -0
- package/dto/article-backstage.dto.js +18 -7
- package/dto/article-collection.dto.d.ts +2 -2
- package/dto/article-collection.dto.js +2 -2
- package/dto/article.dto.d.ts +3 -0
- package/dto/article.dto.js +17 -7
- package/dto/base-article.dto.js +1 -4
- package/dto/base-category.dto.d.ts +2 -0
- package/dto/base-category.dto.js +11 -4
- package/dto/category.dto.d.ts +1 -0
- package/dto/category.dto.js +24 -0
- package/index.cjs.js +345 -307
- package/package.json +1 -1
- package/queries/article.queries.d.ts +7 -3
- package/queries/article.queries.js +39 -4
- package/queries/category.queries.d.ts +6 -3
- package/queries/category.queries.js +46 -7
- package/resolvers/article-backstage.resolver.d.ts +0 -5
- package/resolvers/article-backstage.resolver.js +0 -53
- package/resolvers/article.resolver.d.ts +0 -6
- package/resolvers/article.resolver.js +0 -52
|
@@ -4,8 +4,6 @@ import { ArticleMutations } from './mutations/article.mutations.js';
|
|
|
4
4
|
import { CategoryMutations } from './mutations/category.mutations.js';
|
|
5
5
|
import { ArticleQueries } from './queries/article.queries.js';
|
|
6
6
|
import { CategoryQueries } from './queries/category.queries.js';
|
|
7
|
-
import { ArticleResolver } from './resolvers/article.resolver.js';
|
|
8
|
-
import { ArticleBackstageResolver } from './resolvers/article-backstage.resolver.js';
|
|
9
7
|
|
|
10
8
|
function _ts_decorate(decorators, target, key, desc) {
|
|
11
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -27,8 +25,6 @@ class CMSBaseGraphQLModule {
|
|
|
27
25
|
providers: [
|
|
28
26
|
ArticleQueries,
|
|
29
27
|
ArticleMutations,
|
|
30
|
-
ArticleResolver,
|
|
31
|
-
ArticleBackstageResolver,
|
|
32
28
|
CategoryQueries,
|
|
33
29
|
CategoryMutations
|
|
34
30
|
]
|
|
@@ -46,8 +42,6 @@ class CMSBaseGraphQLModule {
|
|
|
46
42
|
providers: [
|
|
47
43
|
ArticleQueries,
|
|
48
44
|
ArticleMutations,
|
|
49
|
-
ArticleResolver,
|
|
50
|
-
ArticleBackstageResolver,
|
|
51
45
|
CategoryQueries,
|
|
52
46
|
CategoryMutations
|
|
53
47
|
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
+
import { Collection } from './collection.dto.js';
|
|
3
|
+
import { ArticleBackstageDto } from './article-backstage.dto.js';
|
|
4
|
+
|
|
5
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
}
|
|
11
|
+
function _ts_metadata(k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
13
|
+
}
|
|
14
|
+
class ArticleBackstageCollectionDto extends Collection {
|
|
15
|
+
articles;
|
|
16
|
+
}
|
|
17
|
+
_ts_decorate([
|
|
18
|
+
Field(()=>[
|
|
19
|
+
ArticleBackstageDto
|
|
20
|
+
]),
|
|
21
|
+
_ts_metadata("design:type", Array)
|
|
22
|
+
], ArticleBackstageCollectionDto.prototype, "articles", void 0);
|
|
23
|
+
ArticleBackstageCollectionDto = _ts_decorate([
|
|
24
|
+
ObjectType('ArticleBackstageCollection')
|
|
25
|
+
], ArticleBackstageCollectionDto);
|
|
26
|
+
|
|
27
|
+
export { ArticleBackstageCollectionDto };
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { ObjectType } from '@nestjs/graphql';
|
|
1
|
+
import { Field, Int, ObjectType } from '@nestjs/graphql';
|
|
2
2
|
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
3
|
|
|
4
4
|
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
6
6
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
7
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
8
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
9
|
}
|
|
10
|
+
function _ts_metadata(k, v) {
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
12
|
+
}
|
|
10
13
|
class ArticleBackstageDto extends BaseArticleDto {
|
|
14
|
+
version;
|
|
15
|
+
deletedAt;
|
|
11
16
|
}
|
|
17
|
+
_ts_decorate([
|
|
18
|
+
Field(()=>Int),
|
|
19
|
+
_ts_metadata("design:type", Number)
|
|
20
|
+
], ArticleBackstageDto.prototype, "version", void 0);
|
|
21
|
+
_ts_decorate([
|
|
22
|
+
Field(()=>Date, {
|
|
23
|
+
nullable: true
|
|
24
|
+
}),
|
|
25
|
+
_ts_metadata("design:type", Object)
|
|
26
|
+
], ArticleBackstageDto.prototype, "deletedAt", void 0);
|
|
12
27
|
ArticleBackstageDto = _ts_decorate([
|
|
13
|
-
ObjectType('ArticleBackstage'
|
|
14
|
-
implements: [
|
|
15
|
-
BaseArticleDto
|
|
16
|
-
]
|
|
17
|
-
})
|
|
28
|
+
ObjectType('ArticleBackstage')
|
|
18
29
|
], ArticleBackstageDto);
|
|
19
30
|
|
|
20
31
|
export { ArticleBackstageDto };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseArticleDto } from './base-article.dto';
|
|
2
1
|
import { Collection } from './collection.dto';
|
|
2
|
+
import { ArticleDto } from './article.dto';
|
|
3
3
|
export declare class ArticleCollectionDto extends Collection {
|
|
4
|
-
articles:
|
|
4
|
+
articles: ArticleDto[];
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
-
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
2
|
import { Collection } from './collection.dto.js';
|
|
3
|
+
import { ArticleDto } from './article.dto.js';
|
|
4
4
|
|
|
5
5
|
function _ts_decorate(decorators, target, key, desc) {
|
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -16,7 +16,7 @@ class ArticleCollectionDto extends Collection {
|
|
|
16
16
|
}
|
|
17
17
|
_ts_decorate([
|
|
18
18
|
Field(()=>[
|
|
19
|
-
|
|
19
|
+
ArticleDto
|
|
20
20
|
]),
|
|
21
21
|
_ts_metadata("design:type", Array)
|
|
22
22
|
], ArticleCollectionDto.prototype, "articles", void 0);
|
package/dto/article.dto.d.ts
CHANGED
package/dto/article.dto.js
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import { ObjectType } from '@nestjs/graphql';
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
2
|
import { BaseArticleDto } from './base-article.dto.js';
|
|
3
|
+
import { QuadratsContentScalar } from '../quadrats-element.scalar.js';
|
|
3
4
|
|
|
4
5
|
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length, r = c < 3 ? target : desc
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
6
7
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
8
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
10
|
}
|
|
11
|
+
function _ts_metadata(k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
13
|
+
}
|
|
10
14
|
class ArticleDto extends BaseArticleDto {
|
|
15
|
+
title;
|
|
16
|
+
content;
|
|
11
17
|
}
|
|
18
|
+
_ts_decorate([
|
|
19
|
+
Field(()=>String),
|
|
20
|
+
_ts_metadata("design:type", String)
|
|
21
|
+
], ArticleDto.prototype, "title", void 0);
|
|
22
|
+
_ts_decorate([
|
|
23
|
+
Field(()=>QuadratsContentScalar),
|
|
24
|
+
_ts_metadata("design:type", Array)
|
|
25
|
+
], ArticleDto.prototype, "content", void 0);
|
|
12
26
|
ArticleDto = _ts_decorate([
|
|
13
|
-
ObjectType('Article'
|
|
14
|
-
implements: [
|
|
15
|
-
BaseArticleDto
|
|
16
|
-
]
|
|
17
|
-
})
|
|
27
|
+
ObjectType('Article')
|
|
18
28
|
], ArticleDto);
|
|
19
29
|
|
|
20
30
|
export { ArticleDto };
|
package/dto/base-article.dto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Field, ID
|
|
1
|
+
import { Field, ID } from '@nestjs/graphql';
|
|
2
2
|
|
|
3
3
|
function _ts_decorate(decorators, target, key, desc) {
|
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -28,8 +28,5 @@ _ts_decorate([
|
|
|
28
28
|
Field(()=>Date),
|
|
29
29
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
30
30
|
], BaseArticleDto.prototype, "createdAt", void 0);
|
|
31
|
-
BaseArticleDto = _ts_decorate([
|
|
32
|
-
InterfaceType('BaseArticle')
|
|
33
|
-
], BaseArticleDto);
|
|
34
31
|
|
|
35
32
|
export { BaseArticleDto };
|
package/dto/base-category.dto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Field, ID
|
|
1
|
+
import { Field, ID } from '@nestjs/graphql';
|
|
2
2
|
|
|
3
3
|
function _ts_decorate(decorators, target, key, desc) {
|
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
@@ -11,13 +11,20 @@ function _ts_metadata(k, v) {
|
|
|
11
11
|
}
|
|
12
12
|
class BaseCategoryDto {
|
|
13
13
|
id;
|
|
14
|
+
createdAt;
|
|
15
|
+
updatedAt;
|
|
14
16
|
}
|
|
15
17
|
_ts_decorate([
|
|
16
18
|
Field(()=>ID),
|
|
17
19
|
_ts_metadata("design:type", String)
|
|
18
20
|
], BaseCategoryDto.prototype, "id", void 0);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
_ts_decorate([
|
|
22
|
+
Field(()=>Date),
|
|
23
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
24
|
+
], BaseCategoryDto.prototype, "createdAt", void 0);
|
|
25
|
+
_ts_decorate([
|
|
26
|
+
Field(()=>Date),
|
|
27
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
28
|
+
], BaseCategoryDto.prototype, "updatedAt", void 0);
|
|
22
29
|
|
|
23
30
|
export { BaseCategoryDto };
|
package/dto/category.dto.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Field, ObjectType } from '@nestjs/graphql';
|
|
2
|
+
import { BaseCategoryDto } from './base-category.dto.js';
|
|
3
|
+
|
|
4
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc, d;
|
|
6
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
|
+
}
|
|
10
|
+
function _ts_metadata(k, v) {
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
12
|
+
}
|
|
13
|
+
class CategoryDto extends BaseCategoryDto {
|
|
14
|
+
name;
|
|
15
|
+
}
|
|
16
|
+
_ts_decorate([
|
|
17
|
+
Field(()=>String),
|
|
18
|
+
_ts_metadata("design:type", String)
|
|
19
|
+
], CategoryDto.prototype, "name", void 0);
|
|
20
|
+
CategoryDto = _ts_decorate([
|
|
21
|
+
ObjectType('Category')
|
|
22
|
+
], CategoryDto);
|
|
23
|
+
|
|
24
|
+
export { CategoryDto };
|