prisma-nestjs-graphql 17.0.0 → 17.0.1
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/README.md +1 -9
- package/index.js +8 -3
- package/package.json +30 -30
package/README.md
CHANGED
|
@@ -10,16 +10,8 @@ Generate object types, inputs, args, etc. from prisma schema file for usage with
|
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
|
-
Prisma v3
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
npm install --save-dev prisma-nestjs-graphql
|
|
17
13
|
```
|
|
18
|
-
|
|
19
|
-
Prisma v4
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
npm install --save-dev prisma-nestjs-graphql@next
|
|
14
|
+
npm install --save-dev prisma-nestjs-graphql
|
|
23
15
|
```
|
|
24
16
|
|
|
25
17
|
## Usage
|
package/index.js
CHANGED
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
}
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
|
|
19
22
|
// src/index.ts
|
|
20
23
|
var import_generator_helper = require("@prisma/generator-helper");
|
|
@@ -529,7 +532,9 @@ function getGraphqlInputType(inputTypes, pattern) {
|
|
|
529
532
|
return result;
|
|
530
533
|
}
|
|
531
534
|
}
|
|
532
|
-
throw new TypeError(
|
|
535
|
+
throw new TypeError(
|
|
536
|
+
`Cannot get matching input type from ${inputTypes.map((x) => x.type).join(", ") || "zero length inputTypes"}`
|
|
537
|
+
);
|
|
533
538
|
}
|
|
534
539
|
__name(getGraphqlInputType, "getGraphqlInputType");
|
|
535
540
|
|
|
@@ -780,7 +785,7 @@ function inputType(args) {
|
|
|
780
785
|
"updateMany",
|
|
781
786
|
"upsert",
|
|
782
787
|
"where"
|
|
783
|
-
].includes(name) || classTransformerTypeModels.has(getModelName2(graphqlType) || ""))) {
|
|
788
|
+
].includes(name) || classTransformerTypeModels.has(getModelName2(graphqlType) || "") || modelField?.kind === "object" && models.get(modelField.type) && models.get(modelField.type)?.fields.some((field2) => field2.kind === "object" && classTransformerTypeModels.has(field2.type)))) {
|
|
784
789
|
importDeclarations.add("Type", "class-transformer");
|
|
785
790
|
property.decorators.push({
|
|
786
791
|
name: "Type",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma-nestjs-graphql",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@prisma/generator-helper": "^4.
|
|
55
|
+
"@prisma/generator-helper": "^4.1.0",
|
|
56
56
|
"await-event-emitter": "^2.0.2",
|
|
57
57
|
"filenamify": "4.X",
|
|
58
58
|
"flat": "^5.0.2",
|
|
@@ -65,46 +65,46 @@
|
|
|
65
65
|
"ts-morph": ">=11"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@commitlint/cli": "^17.0.
|
|
69
|
-
"@commitlint/config-conventional": "^17.0.
|
|
70
|
-
"@nestjs/apollo": "^10.0.
|
|
71
|
-
"@nestjs/common": "^
|
|
72
|
-
"@nestjs/core": "^
|
|
73
|
-
"@nestjs/graphql": "^10.0.
|
|
74
|
-
"@nestjs/platform-express": "^
|
|
68
|
+
"@commitlint/cli": "^17.0.3",
|
|
69
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
70
|
+
"@nestjs/apollo": "^10.0.19",
|
|
71
|
+
"@nestjs/common": "^9.0.5",
|
|
72
|
+
"@nestjs/core": "^9.0.5",
|
|
73
|
+
"@nestjs/graphql": "^10.0.21",
|
|
74
|
+
"@nestjs/platform-express": "^9.0.5",
|
|
75
75
|
"@paljs/plugins": "^4.1.0",
|
|
76
|
-
"@prisma/client": "^4.
|
|
76
|
+
"@prisma/client": "^4.1.0",
|
|
77
77
|
"@semantic-release/changelog": "^6.0.1",
|
|
78
78
|
"@semantic-release/git": "^10.0.1",
|
|
79
|
-
"@swc/core": "^1.2.
|
|
80
|
-
"@swc/helpers": "^0.3
|
|
79
|
+
"@swc/core": "^1.2.218",
|
|
80
|
+
"@swc/helpers": "^0.4.3",
|
|
81
81
|
"@swc/register": "^0.1.10",
|
|
82
82
|
"@types/flat": "^5.0.2",
|
|
83
83
|
"@types/lodash": "^4.14.182",
|
|
84
84
|
"@types/mocha": "^9.1.1",
|
|
85
|
-
"@types/node": "^
|
|
85
|
+
"@types/node": "^18.0.6",
|
|
86
86
|
"@types/pluralize": "^0.0.29",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
88
|
-
"@typescript-eslint/parser": "^5.
|
|
89
|
-
"apollo-server-express": "^3.
|
|
90
|
-
"c8": "^7.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
88
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
89
|
+
"apollo-server-express": "^3.10.0",
|
|
90
|
+
"c8": "^7.12.0",
|
|
91
91
|
"class-transformer": "^0.5.1",
|
|
92
92
|
"class-validator": "^0.13.2",
|
|
93
|
-
"commitizen": "^4.2.
|
|
94
|
-
"cz-customizable": "^6.
|
|
93
|
+
"commitizen": "^4.2.5",
|
|
94
|
+
"cz-customizable": "^6.9.1",
|
|
95
95
|
"decimal.js": "^10.3.1",
|
|
96
|
-
"eslint": "^8.
|
|
96
|
+
"eslint": "^8.20.0",
|
|
97
97
|
"eslint-import-resolver-node": "^0.3.6",
|
|
98
98
|
"eslint-plugin-etc": "^2.0.2",
|
|
99
99
|
"eslint-plugin-import": "^2.26.0",
|
|
100
100
|
"eslint-plugin-only-warn": "^1.0.3",
|
|
101
|
-
"eslint-plugin-prettier": "^4.
|
|
101
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
102
102
|
"eslint-plugin-regexp": "^1.7.0",
|
|
103
103
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
104
104
|
"eslint-plugin-sort-class-members": "^1.14.1",
|
|
105
|
-
"eslint-plugin-unicorn": "^
|
|
105
|
+
"eslint-plugin-unicorn": "^43.0.2",
|
|
106
106
|
"eslint-plugin-wix-editor": "^3.3.0",
|
|
107
|
-
"expect": "^
|
|
107
|
+
"expect": "^29.0.1",
|
|
108
108
|
"ghooks": "^2.0.4",
|
|
109
109
|
"git-branch-is": "^4.0.0",
|
|
110
110
|
"graphql": "^16.5.0",
|
|
@@ -113,18 +113,18 @@
|
|
|
113
113
|
"mocha": "^10.0.0",
|
|
114
114
|
"ololog": "^1.1.175",
|
|
115
115
|
"precise-commits": "^1.0.2",
|
|
116
|
-
"prettier": "^2.
|
|
117
|
-
"prisma": "^4.
|
|
118
|
-
"prisma-graphql-type-decimal": "^2.0.
|
|
116
|
+
"prettier": "^2.7.1",
|
|
117
|
+
"prisma": "^4.1.0",
|
|
118
|
+
"prisma-graphql-type-decimal": "^2.0.4",
|
|
119
119
|
"reflect-metadata": "^0.1.13",
|
|
120
120
|
"request": "^2.88.2",
|
|
121
|
-
"rxjs": "^7.5.
|
|
122
|
-
"semantic-release": "^19.0.
|
|
121
|
+
"rxjs": "^7.5.6",
|
|
122
|
+
"semantic-release": "^19.0.3",
|
|
123
123
|
"simplytyped": "^3.3.0",
|
|
124
124
|
"temp-dir": "^2.0.0",
|
|
125
|
-
"ts-node": "^10.
|
|
125
|
+
"ts-node": "^10.9.1",
|
|
126
126
|
"tslib": "^2.4.0",
|
|
127
|
-
"typescript": "^4.
|
|
127
|
+
"typescript": "^4.7.4",
|
|
128
128
|
"watchexec-bin": "^1.0.0"
|
|
129
129
|
}
|
|
130
130
|
}
|