@constructive-io/graphql-codegen 4.14.2 → 4.14.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.
|
@@ -175,9 +175,9 @@ function generateModelFile(table, _useSharedTypes, options) {
|
|
|
175
175
|
const findManyTypeArgs = [
|
|
176
176
|
(sel) => sel,
|
|
177
177
|
() => t.tsTypeReference(t.identifier(whereTypeName)),
|
|
178
|
-
|
|
179
|
-
?
|
|
180
|
-
:
|
|
178
|
+
conditionTypeName
|
|
179
|
+
? () => t.tsTypeReference(t.identifier(conditionTypeName))
|
|
180
|
+
: () => t.tsNeverKeyword(),
|
|
181
181
|
() => t.tsTypeReference(t.identifier(orderByTypeName)),
|
|
182
182
|
];
|
|
183
183
|
const argsType = (sel) => t.tsTypeReference(t.identifier('FindManyArgs'), t.tsTypeParameterInstantiation(findManyTypeArgs.map(fn => fn(sel))));
|
package/core/codegen/queries.js
CHANGED
|
@@ -105,7 +105,7 @@ function generateListQueryHook(table, options = {}) {
|
|
|
105
105
|
const findManyKeyTypeArgs = [
|
|
106
106
|
t.tsUnknownKeyword(),
|
|
107
107
|
(0, hooks_ast_1.typeRef)(filterTypeName),
|
|
108
|
-
|
|
108
|
+
conditionTypeName ? (0, hooks_ast_1.typeRef)(conditionTypeName) : t.tsNeverKeyword(),
|
|
109
109
|
(0, hooks_ast_1.typeRef)(orderByTypeName),
|
|
110
110
|
];
|
|
111
111
|
const keyFn = t.arrowFunctionExpression([
|
|
@@ -138,9 +138,9 @@ export function generateModelFile(table, _useSharedTypes, options) {
|
|
|
138
138
|
const findManyTypeArgs = [
|
|
139
139
|
(sel) => sel,
|
|
140
140
|
() => t.tsTypeReference(t.identifier(whereTypeName)),
|
|
141
|
-
|
|
142
|
-
?
|
|
143
|
-
:
|
|
141
|
+
conditionTypeName
|
|
142
|
+
? () => t.tsTypeReference(t.identifier(conditionTypeName))
|
|
143
|
+
: () => t.tsNeverKeyword(),
|
|
144
144
|
() => t.tsTypeReference(t.identifier(orderByTypeName)),
|
|
145
145
|
];
|
|
146
146
|
const argsType = (sel) => t.tsTypeReference(t.identifier('FindManyArgs'), t.tsTypeParameterInstantiation(findManyTypeArgs.map(fn => fn(sel))));
|
|
@@ -67,7 +67,7 @@ export function generateListQueryHook(table, options = {}) {
|
|
|
67
67
|
const findManyKeyTypeArgs = [
|
|
68
68
|
t.tsUnknownKeyword(),
|
|
69
69
|
typeRef(filterTypeName),
|
|
70
|
-
|
|
70
|
+
conditionTypeName ? typeRef(conditionTypeName) : t.tsNeverKeyword(),
|
|
71
71
|
typeRef(orderByTypeName),
|
|
72
72
|
];
|
|
73
73
|
const keyFn = t.arrowFunctionExpression([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.4",
|
|
4
4
|
"description": "GraphQL SDK generator for Constructive databases with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
"@0no-co/graphql.web": "^1.1.2",
|
|
57
57
|
"@babel/generator": "^7.29.1",
|
|
58
58
|
"@babel/types": "^7.29.0",
|
|
59
|
-
"@constructive-io/graphql-query": "^3.6.
|
|
60
|
-
"@constructive-io/graphql-types": "^3.3.
|
|
61
|
-
"@inquirerer/utils": "^3.3.
|
|
62
|
-
"@pgpmjs/core": "^6.6.
|
|
59
|
+
"@constructive-io/graphql-query": "^3.6.1",
|
|
60
|
+
"@constructive-io/graphql-types": "^3.3.3",
|
|
61
|
+
"@inquirerer/utils": "^3.3.4",
|
|
62
|
+
"@pgpmjs/core": "^6.6.3",
|
|
63
63
|
"ajv": "^8.18.0",
|
|
64
64
|
"deepmerge": "^4.3.1",
|
|
65
65
|
"find-and-require-package-json": "^0.9.1",
|
|
66
|
-
"gql-ast": "^3.3.
|
|
67
|
-
"graphile-schema": "^1.6.
|
|
68
|
-
"graphql": "
|
|
66
|
+
"gql-ast": "^3.3.3",
|
|
67
|
+
"graphile-schema": "^1.6.1",
|
|
68
|
+
"graphql": "16.13.0",
|
|
69
69
|
"inflekt": "^0.3.3",
|
|
70
|
-
"inquirerer": "^4.
|
|
70
|
+
"inquirerer": "^4.7.0",
|
|
71
71
|
"jiti": "^2.6.1",
|
|
72
72
|
"komoji": "^0.8.1",
|
|
73
|
-
"oxfmt": "^0.
|
|
74
|
-
"pg-cache": "^3.3.
|
|
73
|
+
"oxfmt": "^0.40.0",
|
|
74
|
+
"pg-cache": "^3.3.3",
|
|
75
75
|
"pg-env": "^1.7.2",
|
|
76
|
-
"pgsql-client": "^3.5.
|
|
77
|
-
"pgsql-seed": "^2.5.
|
|
78
|
-
"undici": "^7.
|
|
76
|
+
"pgsql-client": "^3.5.3",
|
|
77
|
+
"pgsql-seed": "^2.5.3",
|
|
78
|
+
"undici": "^7.24.3"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"@types/jest": "^30.0.0",
|
|
96
96
|
"@types/node": "^22.19.11",
|
|
97
97
|
"@types/react": "^19.2.14",
|
|
98
|
-
"jest": "^30.
|
|
98
|
+
"jest": "^30.3.0",
|
|
99
99
|
"react": "^19.2.4",
|
|
100
100
|
"ts-jest": "^29.2.5",
|
|
101
101
|
"tsx": "^4.21.0",
|
|
102
102
|
"typescript": "^5.9.3"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "21fd7c2c30663548cf15aa448c1935ab56e5497d"
|
|
105
105
|
}
|