@comet/admin-generator 8.8.0-canary-20251120113920 → 8.8.0-canary-20251120133042
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.
|
@@ -271,16 +271,20 @@ function generateGrid({ exportName, baseOutputFilename, targetDirectory, gqlIntr
|
|
|
271
271
|
const hasSort = !!sortArg;
|
|
272
272
|
let sortFields = [];
|
|
273
273
|
if (sortArg) {
|
|
274
|
-
|
|
274
|
+
let sortArgType = sortArg.type;
|
|
275
|
+
if (sortArgType.kind === "NON_NULL") {
|
|
276
|
+
sortArgType = sortArgType.ofType;
|
|
277
|
+
}
|
|
278
|
+
if (sortArgType.kind !== "LIST") {
|
|
275
279
|
throw new Error("Sort argument must be LIST");
|
|
276
280
|
}
|
|
277
|
-
if (
|
|
281
|
+
if (sortArgType.ofType.kind !== "NON_NULL") {
|
|
278
282
|
throw new Error("Sort argument must be LIST->NON_NULL");
|
|
279
283
|
}
|
|
280
|
-
if (
|
|
284
|
+
if (sortArgType.ofType.ofType.kind !== "INPUT_OBJECT") {
|
|
281
285
|
throw new Error("Sort argument must be LIST->NON_NULL->INPUT_OBJECT");
|
|
282
286
|
}
|
|
283
|
-
const sortTypeName =
|
|
287
|
+
const sortTypeName = sortArgType.ofType.ofType.name;
|
|
284
288
|
const sortType = gqlIntrospection.__schema.types.find((type) => type.kind === "INPUT_OBJECT" && type.name === sortTypeName);
|
|
285
289
|
if (!sortType)
|
|
286
290
|
throw new Error("Can't find sort type");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/admin-generator",
|
|
3
|
-
"version": "8.8.0-canary-
|
|
3
|
+
"version": "8.8.0-canary-20251120133042",
|
|
4
4
|
"description": "Comet Admin Generator CLI tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/admin/admin-generator",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"rimraf": "^6.0.1",
|
|
49
49
|
"ts-jest": "^29.4.0",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
|
-
"@comet/admin": "8.8.0-canary-
|
|
52
|
-
"@comet/admin-icons": "8.8.0-canary-
|
|
53
|
-
"@comet/cms-admin": "8.8.0-canary-
|
|
54
|
-
"@comet/eslint-config": "8.8.0-canary-
|
|
51
|
+
"@comet/admin": "8.8.0-canary-20251120133042",
|
|
52
|
+
"@comet/admin-icons": "8.8.0-canary-20251120133042",
|
|
53
|
+
"@comet/cms-admin": "8.8.0-canary-20251120133042",
|
|
54
|
+
"@comet/eslint-config": "8.8.0-canary-20251120133042"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22.0.0"
|