@constructive-io/graphql-codegen 2.18.0 → 2.20.0
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 +1818 -113
- package/__tests__/codegen/input-types-generator.test.d.ts +1 -0
- package/__tests__/codegen/input-types-generator.test.js +635 -0
- package/cli/codegen/barrel.d.ts +27 -0
- package/cli/codegen/barrel.js +163 -0
- package/cli/codegen/client.d.ts +4 -0
- package/cli/codegen/client.js +170 -0
- package/cli/codegen/custom-mutations.d.ts +38 -0
- package/cli/codegen/custom-mutations.js +149 -0
- package/cli/codegen/custom-queries.d.ts +38 -0
- package/cli/codegen/custom-queries.js +358 -0
- package/cli/codegen/filters.d.ts +27 -0
- package/cli/codegen/filters.js +357 -0
- package/cli/codegen/gql-ast.d.ts +41 -0
- package/cli/codegen/gql-ast.js +329 -0
- package/cli/codegen/index.d.ts +71 -0
- package/cli/codegen/index.js +147 -0
- package/cli/codegen/mutations.d.ts +30 -0
- package/cli/codegen/mutations.js +410 -0
- package/cli/codegen/orm/barrel.d.ts +18 -0
- package/cli/codegen/orm/barrel.js +48 -0
- package/cli/codegen/orm/client-generator.d.ts +45 -0
- package/cli/codegen/orm/client-generator.js +646 -0
- package/cli/codegen/orm/custom-ops-generator.d.ts +30 -0
- package/cli/codegen/orm/custom-ops-generator.js +350 -0
- package/cli/codegen/orm/index.d.ts +38 -0
- package/cli/codegen/orm/index.js +88 -0
- package/cli/codegen/orm/input-types-generator.d.ts +21 -0
- package/cli/codegen/orm/input-types-generator.js +705 -0
- package/cli/codegen/orm/input-types-generator.test.d.ts +1 -0
- package/cli/codegen/orm/input-types-generator.test.js +75 -0
- package/cli/codegen/orm/model-generator.d.ts +32 -0
- package/cli/codegen/orm/model-generator.js +264 -0
- package/cli/codegen/orm/query-builder.d.ts +161 -0
- package/cli/codegen/orm/query-builder.js +366 -0
- package/cli/codegen/orm/select-types.d.ts +169 -0
- package/cli/codegen/orm/select-types.js +16 -0
- package/cli/codegen/orm/select-types.test.d.ts +11 -0
- package/cli/codegen/orm/select-types.test.js +22 -0
- package/cli/codegen/queries.d.ts +25 -0
- package/cli/codegen/queries.js +438 -0
- package/cli/codegen/scalars.d.ts +12 -0
- package/cli/codegen/scalars.js +71 -0
- package/cli/codegen/schema-gql-ast.d.ts +51 -0
- package/cli/codegen/schema-gql-ast.js +385 -0
- package/cli/codegen/ts-ast.d.ts +122 -0
- package/cli/codegen/ts-ast.js +280 -0
- package/cli/codegen/type-resolver.d.ts +96 -0
- package/cli/codegen/type-resolver.js +246 -0
- package/cli/codegen/types.d.ts +12 -0
- package/cli/codegen/types.js +69 -0
- package/cli/codegen/utils.d.ts +163 -0
- package/cli/codegen/utils.js +326 -0
- package/cli/commands/generate-orm.d.ts +37 -0
- package/cli/commands/generate-orm.js +195 -0
- package/cli/commands/generate.d.ts +39 -0
- package/cli/commands/generate.js +299 -0
- package/cli/commands/index.d.ts +7 -0
- package/cli/commands/index.js +12 -0
- package/cli/commands/init.d.ts +35 -0
- package/cli/commands/init.js +176 -0
- package/cli/index.d.ts +4 -0
- package/cli/index.js +291 -0
- package/cli/introspect/fetch-meta.d.ts +31 -0
- package/cli/introspect/fetch-meta.js +108 -0
- package/cli/introspect/fetch-schema.d.ts +21 -0
- package/cli/introspect/fetch-schema.js +86 -0
- package/cli/introspect/index.d.ts +8 -0
- package/cli/introspect/index.js +16 -0
- package/cli/introspect/meta-query.d.ts +111 -0
- package/cli/introspect/meta-query.js +191 -0
- package/cli/introspect/schema-query.d.ts +20 -0
- package/cli/introspect/schema-query.js +123 -0
- package/cli/introspect/transform-schema.d.ts +74 -0
- package/cli/introspect/transform-schema.js +269 -0
- package/cli/introspect/transform-schema.test.d.ts +1 -0
- package/cli/introspect/transform-schema.test.js +67 -0
- package/cli/introspect/transform.d.ts +21 -0
- package/cli/introspect/transform.js +216 -0
- package/cli/watch/cache.d.ts +45 -0
- package/cli/watch/cache.js +111 -0
- package/cli/watch/debounce.d.ts +19 -0
- package/cli/watch/debounce.js +89 -0
- package/cli/watch/hash.d.ts +17 -0
- package/cli/watch/hash.js +48 -0
- package/cli/watch/index.d.ts +10 -0
- package/cli/watch/index.js +22 -0
- package/cli/watch/orchestrator.d.ts +63 -0
- package/cli/watch/orchestrator.js +228 -0
- package/cli/watch/poller.d.ts +65 -0
- package/cli/watch/poller.js +203 -0
- package/cli/watch/types.d.ts +67 -0
- package/cli/watch/types.js +5 -0
- package/client/error.d.ts +95 -0
- package/client/error.js +255 -0
- package/client/execute.d.ts +57 -0
- package/client/execute.js +124 -0
- package/client/index.d.ts +6 -0
- package/client/index.js +18 -0
- package/client/typed-document.d.ts +31 -0
- package/client/typed-document.js +44 -0
- package/core/ast.d.ts +10 -0
- package/core/ast.js +593 -0
- package/core/custom-ast.d.ts +35 -0
- package/core/custom-ast.js +204 -0
- package/core/index.d.ts +8 -0
- package/core/index.js +33 -0
- package/core/meta-object/convert.d.ts +65 -0
- package/core/meta-object/convert.js +63 -0
- package/core/meta-object/format.json +93 -0
- package/core/meta-object/index.d.ts +2 -0
- package/core/meta-object/index.js +18 -0
- package/core/meta-object/validate.d.ts +9 -0
- package/core/meta-object/validate.js +34 -0
- package/core/query-builder.d.ts +46 -0
- package/core/query-builder.js +412 -0
- package/core/types.d.ts +139 -0
- package/core/types.js +28 -0
- package/esm/__tests__/codegen/input-types-generator.test.d.ts +1 -0
- package/esm/__tests__/codegen/input-types-generator.test.js +633 -0
- package/esm/cli/codegen/barrel.d.ts +27 -0
- package/esm/cli/codegen/barrel.js +156 -0
- package/esm/cli/codegen/client.d.ts +4 -0
- package/esm/cli/codegen/client.js +167 -0
- package/esm/cli/codegen/custom-mutations.d.ts +38 -0
- package/esm/cli/codegen/custom-mutations.js +145 -0
- package/esm/cli/codegen/custom-queries.d.ts +38 -0
- package/esm/cli/codegen/custom-queries.js +354 -0
- package/esm/cli/codegen/filters.d.ts +27 -0
- package/esm/cli/codegen/filters.js +351 -0
- package/esm/cli/codegen/gql-ast.d.ts +41 -0
- package/esm/cli/codegen/gql-ast.js +288 -0
- package/esm/cli/codegen/index.d.ts +71 -0
- package/esm/cli/codegen/index.js +124 -0
- package/esm/cli/codegen/mutations.d.ts +30 -0
- package/esm/cli/codegen/mutations.js +404 -0
- package/esm/cli/codegen/orm/barrel.d.ts +18 -0
- package/esm/cli/codegen/orm/barrel.js +44 -0
- package/esm/cli/codegen/orm/client-generator.d.ts +45 -0
- package/esm/cli/codegen/orm/client-generator.js +640 -0
- package/esm/cli/codegen/orm/custom-ops-generator.d.ts +30 -0
- package/esm/cli/codegen/orm/custom-ops-generator.js +346 -0
- package/esm/cli/codegen/orm/index.d.ts +38 -0
- package/esm/cli/codegen/orm/index.js +75 -0
- package/esm/cli/codegen/orm/input-types-generator.d.ts +21 -0
- package/esm/cli/codegen/orm/input-types-generator.js +700 -0
- package/esm/cli/codegen/orm/input-types-generator.test.d.ts +1 -0
- package/esm/cli/codegen/orm/input-types-generator.test.js +73 -0
- package/esm/cli/codegen/orm/model-generator.d.ts +32 -0
- package/esm/cli/codegen/orm/model-generator.js +260 -0
- package/esm/cli/codegen/orm/query-builder.d.ts +161 -0
- package/esm/cli/codegen/orm/query-builder.js +353 -0
- package/esm/cli/codegen/orm/select-types.d.ts +169 -0
- package/esm/cli/codegen/orm/select-types.js +15 -0
- package/esm/cli/codegen/orm/select-types.test.d.ts +11 -0
- package/esm/cli/codegen/orm/select-types.test.js +21 -0
- package/esm/cli/codegen/queries.d.ts +25 -0
- package/esm/cli/codegen/queries.js +433 -0
- package/esm/cli/codegen/scalars.d.ts +12 -0
- package/esm/cli/codegen/scalars.js +66 -0
- package/esm/cli/codegen/schema-gql-ast.d.ts +51 -0
- package/esm/cli/codegen/schema-gql-ast.js +343 -0
- package/esm/cli/codegen/ts-ast.d.ts +122 -0
- package/esm/cli/codegen/ts-ast.js +260 -0
- package/esm/cli/codegen/type-resolver.d.ts +96 -0
- package/esm/cli/codegen/type-resolver.js +224 -0
- package/esm/cli/codegen/types.d.ts +12 -0
- package/esm/cli/codegen/types.js +65 -0
- package/esm/cli/codegen/utils.d.ts +163 -0
- package/esm/cli/codegen/utils.js +288 -0
- package/esm/cli/commands/generate-orm.d.ts +37 -0
- package/esm/cli/commands/generate-orm.js +192 -0
- package/esm/cli/commands/generate.d.ts +39 -0
- package/esm/cli/commands/generate.js +262 -0
- package/esm/cli/commands/index.d.ts +7 -0
- package/esm/cli/commands/index.js +5 -0
- package/esm/cli/commands/init.d.ts +35 -0
- package/esm/cli/commands/init.js +138 -0
- package/esm/cli/index.d.ts +4 -0
- package/esm/cli/index.js +256 -0
- package/esm/cli/introspect/fetch-meta.d.ts +31 -0
- package/esm/cli/introspect/fetch-meta.js +104 -0
- package/esm/cli/introspect/fetch-schema.d.ts +21 -0
- package/esm/cli/introspect/fetch-schema.js +83 -0
- package/esm/cli/introspect/index.d.ts +8 -0
- package/esm/cli/introspect/index.js +6 -0
- package/esm/cli/introspect/meta-query.d.ts +111 -0
- package/esm/cli/introspect/meta-query.js +188 -0
- package/esm/cli/introspect/schema-query.d.ts +20 -0
- package/esm/cli/introspect/schema-query.js +120 -0
- package/esm/cli/introspect/transform-schema.d.ts +74 -0
- package/esm/cli/introspect/transform-schema.js +259 -0
- package/esm/cli/introspect/transform-schema.test.d.ts +1 -0
- package/esm/cli/introspect/transform-schema.test.js +65 -0
- package/esm/cli/introspect/transform.d.ts +21 -0
- package/esm/cli/introspect/transform.js +210 -0
- package/esm/cli/watch/cache.d.ts +45 -0
- package/esm/cli/watch/cache.js +73 -0
- package/esm/cli/watch/debounce.d.ts +19 -0
- package/esm/cli/watch/debounce.js +85 -0
- package/esm/cli/watch/hash.d.ts +17 -0
- package/esm/cli/watch/hash.js +43 -0
- package/esm/cli/watch/index.d.ts +10 -0
- package/esm/cli/watch/index.js +8 -0
- package/esm/cli/watch/orchestrator.d.ts +63 -0
- package/esm/cli/watch/orchestrator.js +223 -0
- package/esm/cli/watch/poller.d.ts +65 -0
- package/esm/cli/watch/poller.js +198 -0
- package/esm/cli/watch/types.d.ts +67 -0
- package/esm/cli/watch/types.js +4 -0
- package/esm/client/error.d.ts +95 -0
- package/esm/client/error.js +249 -0
- package/esm/client/execute.d.ts +57 -0
- package/esm/client/execute.js +120 -0
- package/esm/client/index.d.ts +6 -0
- package/esm/client/index.js +6 -0
- package/esm/client/typed-document.d.ts +31 -0
- package/esm/client/typed-document.js +40 -0
- package/esm/core/ast.d.ts +10 -0
- package/esm/core/ast.js +549 -0
- package/esm/core/custom-ast.d.ts +35 -0
- package/esm/core/custom-ast.js +161 -0
- package/esm/core/index.d.ts +8 -0
- package/esm/core/index.js +12 -0
- package/esm/core/meta-object/convert.d.ts +65 -0
- package/esm/core/meta-object/convert.js +60 -0
- package/esm/core/meta-object/format.json +93 -0
- package/esm/core/meta-object/index.d.ts +2 -0
- package/esm/core/meta-object/index.js +2 -0
- package/esm/core/meta-object/validate.d.ts +9 -0
- package/esm/core/meta-object/validate.js +28 -0
- package/esm/core/query-builder.d.ts +46 -0
- package/esm/core/query-builder.js +375 -0
- package/esm/core/types.d.ts +139 -0
- package/esm/core/types.js +24 -0
- package/esm/generators/field-selector.d.ts +30 -0
- package/esm/generators/field-selector.js +355 -0
- package/esm/generators/index.d.ts +6 -0
- package/esm/generators/index.js +9 -0
- package/esm/generators/mutations.d.ts +31 -0
- package/esm/generators/mutations.js +197 -0
- package/esm/generators/select.d.ts +50 -0
- package/esm/generators/select.js +636 -0
- package/esm/index.d.ts +12 -0
- package/esm/index.js +17 -3
- package/esm/react/index.d.ts +5 -0
- package/esm/react/index.js +6 -0
- package/esm/types/config.d.ts +199 -0
- package/esm/types/config.js +106 -0
- package/esm/types/index.d.ts +9 -0
- package/esm/types/index.js +4 -0
- package/esm/types/introspection.d.ts +121 -0
- package/esm/types/introspection.js +54 -0
- package/esm/types/mutation.d.ts +45 -0
- package/esm/types/mutation.js +4 -0
- package/esm/types/query.d.ts +82 -0
- package/esm/types/query.js +4 -0
- package/esm/types/schema.d.ts +253 -0
- package/esm/types/schema.js +5 -0
- package/esm/types/selection.d.ts +43 -0
- package/esm/types/selection.js +4 -0
- package/esm/utils/index.d.ts +4 -0
- package/esm/utils/index.js +4 -0
- package/generators/field-selector.d.ts +30 -0
- package/generators/field-selector.js +361 -0
- package/generators/index.d.ts +6 -0
- package/generators/index.js +27 -0
- package/generators/mutations.d.ts +31 -0
- package/generators/mutations.js +235 -0
- package/generators/select.d.ts +50 -0
- package/generators/select.js +679 -0
- package/index.d.ts +12 -3
- package/index.js +19 -3
- package/package.json +59 -38
- package/react/index.d.ts +5 -0
- package/react/index.js +9 -0
- package/types/config.d.ts +199 -0
- package/types/config.js +111 -0
- package/types/index.d.ts +9 -0
- package/types/index.js +10 -0
- package/types/introspection.d.ts +121 -0
- package/types/introspection.js +62 -0
- package/types/mutation.d.ts +45 -0
- package/types/mutation.js +5 -0
- package/types/query.d.ts +82 -0
- package/types/query.js +5 -0
- package/types/schema.d.ts +253 -0
- package/types/schema.js +6 -0
- package/types/selection.d.ts +43 -0
- package/types/selection.js +5 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.js +7 -0
- package/codegen.d.ts +0 -13
- package/codegen.js +0 -293
- package/esm/codegen.js +0 -253
- package/esm/gql.js +0 -939
- package/esm/options.js +0 -27
- package/gql.d.ts +0 -188
- package/gql.js +0 -992
- package/options.d.ts +0 -45
- package/options.js +0 -31
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateTypesFile = generateTypesFile;
|
|
4
|
+
exports.generateMinimalEntityType = generateMinimalEntityType;
|
|
5
|
+
const ts_ast_1 = require("./ts-ast");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
const filters_1 = require("./filters");
|
|
8
|
+
/**
|
|
9
|
+
* Generate types.ts content with all entity interfaces and base filter types
|
|
10
|
+
*/
|
|
11
|
+
function generateTypesFile(tables) {
|
|
12
|
+
const project = (0, ts_ast_1.createProject)();
|
|
13
|
+
const sourceFile = (0, ts_ast_1.createSourceFile)(project, 'types.ts');
|
|
14
|
+
// Add file header
|
|
15
|
+
sourceFile.insertText(0, (0, ts_ast_1.createFileHeader)('Entity types and filter types') + '\n\n');
|
|
16
|
+
// Add section comment
|
|
17
|
+
sourceFile.addStatements('// ============================================================================');
|
|
18
|
+
sourceFile.addStatements('// Entity types');
|
|
19
|
+
sourceFile.addStatements('// ============================================================================\n');
|
|
20
|
+
// Generate entity interfaces
|
|
21
|
+
for (const table of tables) {
|
|
22
|
+
const scalarFields = (0, utils_1.getScalarFields)(table);
|
|
23
|
+
const properties = scalarFields.map((field) => ({
|
|
24
|
+
name: field.name,
|
|
25
|
+
type: `${(0, utils_1.fieldTypeToTs)(field.type)} | null`,
|
|
26
|
+
}));
|
|
27
|
+
sourceFile.addInterface((0, ts_ast_1.createInterface)(table.name, properties));
|
|
28
|
+
}
|
|
29
|
+
// Add section comment for filters
|
|
30
|
+
sourceFile.addStatements('\n// ============================================================================');
|
|
31
|
+
sourceFile.addStatements('// Filter types (shared)');
|
|
32
|
+
sourceFile.addStatements('// ============================================================================\n');
|
|
33
|
+
// Add base filter types (using string concat for complex types - acceptable for static definitions)
|
|
34
|
+
const filterTypesContent = (0, filters_1.generateBaseFilterTypes)();
|
|
35
|
+
// Extract just the interfaces part (skip the header)
|
|
36
|
+
const filterInterfaces = filterTypesContent
|
|
37
|
+
.split('\n')
|
|
38
|
+
.slice(6) // Skip header lines
|
|
39
|
+
.join('\n');
|
|
40
|
+
sourceFile.addStatements(filterInterfaces);
|
|
41
|
+
return (0, ts_ast_1.getFormattedOutput)(sourceFile);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Generate a minimal entity type (just id and display fields)
|
|
45
|
+
*/
|
|
46
|
+
function generateMinimalEntityType(table) {
|
|
47
|
+
const project = (0, ts_ast_1.createProject)();
|
|
48
|
+
const sourceFile = (0, ts_ast_1.createSourceFile)(project, 'minimal.ts');
|
|
49
|
+
const scalarFields = (0, utils_1.getScalarFields)(table);
|
|
50
|
+
// Find id and likely display fields
|
|
51
|
+
const displayFields = scalarFields.filter((f) => {
|
|
52
|
+
const name = f.name.toLowerCase();
|
|
53
|
+
return (name === 'id' ||
|
|
54
|
+
name === 'name' ||
|
|
55
|
+
name === 'title' ||
|
|
56
|
+
name === 'label' ||
|
|
57
|
+
name === 'email' ||
|
|
58
|
+
name.endsWith('name') ||
|
|
59
|
+
name.endsWith('title'));
|
|
60
|
+
});
|
|
61
|
+
// If no display fields found, take first 5 scalar fields
|
|
62
|
+
const fieldsToUse = displayFields.length > 0 ? displayFields : scalarFields.slice(0, 5);
|
|
63
|
+
const properties = fieldsToUse.map((field) => ({
|
|
64
|
+
name: field.name,
|
|
65
|
+
type: `${(0, utils_1.fieldTypeToTs)(field.type)} | null`,
|
|
66
|
+
}));
|
|
67
|
+
sourceFile.addInterface((0, ts_ast_1.createInterface)(`${table.name}Minimal`, properties));
|
|
68
|
+
return (0, ts_ast_1.getFormattedOutput)(sourceFile);
|
|
69
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codegen utilities - naming conventions, type mapping, and helpers
|
|
3
|
+
*/
|
|
4
|
+
import type { CleanTable, CleanField, CleanFieldType } from '../../types/schema';
|
|
5
|
+
/** Lowercase first character */
|
|
6
|
+
export declare function lcFirst(str: string): string;
|
|
7
|
+
/** Uppercase first character */
|
|
8
|
+
export declare function ucFirst(str: string): string;
|
|
9
|
+
/** Convert to camelCase */
|
|
10
|
+
export declare function toCamelCase(str: string): string;
|
|
11
|
+
/** Convert to PascalCase */
|
|
12
|
+
export declare function toPascalCase(str: string): string;
|
|
13
|
+
/** Convert to SCREAMING_SNAKE_CASE */
|
|
14
|
+
export declare function toScreamingSnake(str: string): string;
|
|
15
|
+
export interface TableNames {
|
|
16
|
+
/** PascalCase singular (e.g., "Car") */
|
|
17
|
+
typeName: string;
|
|
18
|
+
/** camelCase singular (e.g., "car") */
|
|
19
|
+
singularName: string;
|
|
20
|
+
/** camelCase plural (e.g., "cars") */
|
|
21
|
+
pluralName: string;
|
|
22
|
+
/** PascalCase plural (e.g., "Cars") */
|
|
23
|
+
pluralTypeName: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Derive all naming variants from a table
|
|
27
|
+
*/
|
|
28
|
+
export declare function getTableNames(table: CleanTable): TableNames;
|
|
29
|
+
/**
|
|
30
|
+
* Generate hook function name for list query
|
|
31
|
+
* e.g., "useCarsQuery"
|
|
32
|
+
*/
|
|
33
|
+
export declare function getListQueryHookName(table: CleanTable): string;
|
|
34
|
+
/**
|
|
35
|
+
* Generate hook function name for single item query
|
|
36
|
+
* e.g., "useCarQuery"
|
|
37
|
+
*/
|
|
38
|
+
export declare function getSingleQueryHookName(table: CleanTable): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generate hook function name for create mutation
|
|
41
|
+
* e.g., "useCreateCarMutation"
|
|
42
|
+
*/
|
|
43
|
+
export declare function getCreateMutationHookName(table: CleanTable): string;
|
|
44
|
+
/**
|
|
45
|
+
* Generate hook function name for update mutation
|
|
46
|
+
* e.g., "useUpdateCarMutation"
|
|
47
|
+
*/
|
|
48
|
+
export declare function getUpdateMutationHookName(table: CleanTable): string;
|
|
49
|
+
/**
|
|
50
|
+
* Generate hook function name for delete mutation
|
|
51
|
+
* e.g., "useDeleteCarMutation"
|
|
52
|
+
*/
|
|
53
|
+
export declare function getDeleteMutationHookName(table: CleanTable): string;
|
|
54
|
+
/**
|
|
55
|
+
* Generate file name for list query hook
|
|
56
|
+
* e.g., "useCarsQuery.ts"
|
|
57
|
+
*/
|
|
58
|
+
export declare function getListQueryFileName(table: CleanTable): string;
|
|
59
|
+
/**
|
|
60
|
+
* Generate file name for single query hook
|
|
61
|
+
* e.g., "useCarQuery.ts"
|
|
62
|
+
*/
|
|
63
|
+
export declare function getSingleQueryFileName(table: CleanTable): string;
|
|
64
|
+
/**
|
|
65
|
+
* Generate file name for create mutation hook
|
|
66
|
+
*/
|
|
67
|
+
export declare function getCreateMutationFileName(table: CleanTable): string;
|
|
68
|
+
/**
|
|
69
|
+
* Generate file name for update mutation hook
|
|
70
|
+
*/
|
|
71
|
+
export declare function getUpdateMutationFileName(table: CleanTable): string;
|
|
72
|
+
/**
|
|
73
|
+
* Generate file name for delete mutation hook
|
|
74
|
+
*/
|
|
75
|
+
export declare function getDeleteMutationFileName(table: CleanTable): string;
|
|
76
|
+
/**
|
|
77
|
+
* Get the GraphQL query name for fetching all rows
|
|
78
|
+
* Uses inflection from _meta, falls back to convention
|
|
79
|
+
*/
|
|
80
|
+
export declare function getAllRowsQueryName(table: CleanTable): string;
|
|
81
|
+
/**
|
|
82
|
+
* Get the GraphQL query name for fetching single row
|
|
83
|
+
*/
|
|
84
|
+
export declare function getSingleRowQueryName(table: CleanTable): string;
|
|
85
|
+
/**
|
|
86
|
+
* Get the GraphQL mutation name for creating
|
|
87
|
+
*/
|
|
88
|
+
export declare function getCreateMutationName(table: CleanTable): string;
|
|
89
|
+
/**
|
|
90
|
+
* Get the GraphQL mutation name for updating
|
|
91
|
+
*/
|
|
92
|
+
export declare function getUpdateMutationName(table: CleanTable): string;
|
|
93
|
+
/**
|
|
94
|
+
* Get the GraphQL mutation name for deleting
|
|
95
|
+
*/
|
|
96
|
+
export declare function getDeleteMutationName(table: CleanTable): string;
|
|
97
|
+
/**
|
|
98
|
+
* Get PostGraphile filter type name
|
|
99
|
+
* e.g., "CarFilter"
|
|
100
|
+
*/
|
|
101
|
+
export declare function getFilterTypeName(table: CleanTable): string;
|
|
102
|
+
/**
|
|
103
|
+
* Get PostGraphile OrderBy enum type name
|
|
104
|
+
* e.g., "CarsOrderBy"
|
|
105
|
+
*/
|
|
106
|
+
export declare function getOrderByTypeName(table: CleanTable): string;
|
|
107
|
+
/**
|
|
108
|
+
* Get PostGraphile create input type name
|
|
109
|
+
* e.g., "CreateCarInput"
|
|
110
|
+
*/
|
|
111
|
+
export declare function getCreateInputTypeName(table: CleanTable): string;
|
|
112
|
+
/**
|
|
113
|
+
* Get PostGraphile patch type name for updates
|
|
114
|
+
* e.g., "CarPatch"
|
|
115
|
+
*/
|
|
116
|
+
export declare function getPatchTypeName(table: CleanTable): string;
|
|
117
|
+
/**
|
|
118
|
+
* Get PostGraphile update input type name
|
|
119
|
+
* e.g., "UpdateCarInput"
|
|
120
|
+
*/
|
|
121
|
+
export declare function getUpdateInputTypeName(table: CleanTable): string;
|
|
122
|
+
/**
|
|
123
|
+
* Get PostGraphile delete input type name
|
|
124
|
+
* e.g., "DeleteCarInput"
|
|
125
|
+
*/
|
|
126
|
+
export declare function getDeleteInputTypeName(table: CleanTable): string;
|
|
127
|
+
/**
|
|
128
|
+
* Convert GraphQL type to TypeScript type
|
|
129
|
+
*/
|
|
130
|
+
export declare function gqlTypeToTs(gqlType: string, isArray?: boolean): string;
|
|
131
|
+
/**
|
|
132
|
+
* Convert CleanFieldType to TypeScript type string
|
|
133
|
+
*/
|
|
134
|
+
export declare function fieldTypeToTs(fieldType: CleanFieldType): string;
|
|
135
|
+
/**
|
|
136
|
+
* Get the PostGraphile filter type for a GraphQL scalar
|
|
137
|
+
*/
|
|
138
|
+
export declare function getScalarFilterType(gqlType: string): string | null;
|
|
139
|
+
/**
|
|
140
|
+
* Check if a field is a relation field (not a scalar)
|
|
141
|
+
*/
|
|
142
|
+
export declare function isRelationField(fieldName: string, table: CleanTable): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Get only scalar fields (non-relation fields)
|
|
145
|
+
*/
|
|
146
|
+
export declare function getScalarFields(table: CleanTable): CleanField[];
|
|
147
|
+
/**
|
|
148
|
+
* Get primary key field names
|
|
149
|
+
*/
|
|
150
|
+
export declare function getPrimaryKeyFields(table: CleanTable): string[];
|
|
151
|
+
/**
|
|
152
|
+
* Generate query key prefix for a table
|
|
153
|
+
* e.g., "cars" for list queries, "car" for detail queries
|
|
154
|
+
*/
|
|
155
|
+
export declare function getQueryKeyPrefix(table: CleanTable): string;
|
|
156
|
+
/**
|
|
157
|
+
* Generate a doc comment header for generated files
|
|
158
|
+
*/
|
|
159
|
+
export declare function getGeneratedFileHeader(description: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* Indent a multi-line string
|
|
162
|
+
*/
|
|
163
|
+
export declare function indent(str: string, spaces?: number): string;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lcFirst = lcFirst;
|
|
4
|
+
exports.ucFirst = ucFirst;
|
|
5
|
+
exports.toCamelCase = toCamelCase;
|
|
6
|
+
exports.toPascalCase = toPascalCase;
|
|
7
|
+
exports.toScreamingSnake = toScreamingSnake;
|
|
8
|
+
exports.getTableNames = getTableNames;
|
|
9
|
+
exports.getListQueryHookName = getListQueryHookName;
|
|
10
|
+
exports.getSingleQueryHookName = getSingleQueryHookName;
|
|
11
|
+
exports.getCreateMutationHookName = getCreateMutationHookName;
|
|
12
|
+
exports.getUpdateMutationHookName = getUpdateMutationHookName;
|
|
13
|
+
exports.getDeleteMutationHookName = getDeleteMutationHookName;
|
|
14
|
+
exports.getListQueryFileName = getListQueryFileName;
|
|
15
|
+
exports.getSingleQueryFileName = getSingleQueryFileName;
|
|
16
|
+
exports.getCreateMutationFileName = getCreateMutationFileName;
|
|
17
|
+
exports.getUpdateMutationFileName = getUpdateMutationFileName;
|
|
18
|
+
exports.getDeleteMutationFileName = getDeleteMutationFileName;
|
|
19
|
+
exports.getAllRowsQueryName = getAllRowsQueryName;
|
|
20
|
+
exports.getSingleRowQueryName = getSingleRowQueryName;
|
|
21
|
+
exports.getCreateMutationName = getCreateMutationName;
|
|
22
|
+
exports.getUpdateMutationName = getUpdateMutationName;
|
|
23
|
+
exports.getDeleteMutationName = getDeleteMutationName;
|
|
24
|
+
exports.getFilterTypeName = getFilterTypeName;
|
|
25
|
+
exports.getOrderByTypeName = getOrderByTypeName;
|
|
26
|
+
exports.getCreateInputTypeName = getCreateInputTypeName;
|
|
27
|
+
exports.getPatchTypeName = getPatchTypeName;
|
|
28
|
+
exports.getUpdateInputTypeName = getUpdateInputTypeName;
|
|
29
|
+
exports.getDeleteInputTypeName = getDeleteInputTypeName;
|
|
30
|
+
exports.gqlTypeToTs = gqlTypeToTs;
|
|
31
|
+
exports.fieldTypeToTs = fieldTypeToTs;
|
|
32
|
+
exports.getScalarFilterType = getScalarFilterType;
|
|
33
|
+
exports.isRelationField = isRelationField;
|
|
34
|
+
exports.getScalarFields = getScalarFields;
|
|
35
|
+
exports.getPrimaryKeyFields = getPrimaryKeyFields;
|
|
36
|
+
exports.getQueryKeyPrefix = getQueryKeyPrefix;
|
|
37
|
+
exports.getGeneratedFileHeader = getGeneratedFileHeader;
|
|
38
|
+
exports.indent = indent;
|
|
39
|
+
const scalars_1 = require("./scalars");
|
|
40
|
+
// ============================================================================
|
|
41
|
+
// String manipulation
|
|
42
|
+
// ============================================================================
|
|
43
|
+
/** Lowercase first character */
|
|
44
|
+
function lcFirst(str) {
|
|
45
|
+
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
46
|
+
}
|
|
47
|
+
/** Uppercase first character */
|
|
48
|
+
function ucFirst(str) {
|
|
49
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
50
|
+
}
|
|
51
|
+
/** Convert to camelCase */
|
|
52
|
+
function toCamelCase(str) {
|
|
53
|
+
return str
|
|
54
|
+
.replace(/[-_](.)/g, (_, char) => char.toUpperCase())
|
|
55
|
+
.replace(/^(.)/, (_, char) => char.toLowerCase());
|
|
56
|
+
}
|
|
57
|
+
/** Convert to PascalCase */
|
|
58
|
+
function toPascalCase(str) {
|
|
59
|
+
return str
|
|
60
|
+
.replace(/[-_](.)/g, (_, char) => char.toUpperCase())
|
|
61
|
+
.replace(/^(.)/, (_, char) => char.toUpperCase());
|
|
62
|
+
}
|
|
63
|
+
/** Convert to SCREAMING_SNAKE_CASE */
|
|
64
|
+
function toScreamingSnake(str) {
|
|
65
|
+
return str
|
|
66
|
+
.replace(/([A-Z])/g, '_$1')
|
|
67
|
+
.replace(/[-\s]/g, '_')
|
|
68
|
+
.toUpperCase()
|
|
69
|
+
.replace(/^_/, '');
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Derive all naming variants from a table
|
|
73
|
+
*/
|
|
74
|
+
function getTableNames(table) {
|
|
75
|
+
const typeName = table.name;
|
|
76
|
+
const singularName = table.inflection?.tableFieldName || lcFirst(typeName);
|
|
77
|
+
const pluralName = table.query?.all || table.inflection?.allRows || singularName + 's';
|
|
78
|
+
const pluralTypeName = ucFirst(pluralName);
|
|
79
|
+
return {
|
|
80
|
+
typeName,
|
|
81
|
+
singularName,
|
|
82
|
+
pluralName,
|
|
83
|
+
pluralTypeName,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Generate hook function name for list query
|
|
88
|
+
* e.g., "useCarsQuery"
|
|
89
|
+
*/
|
|
90
|
+
function getListQueryHookName(table) {
|
|
91
|
+
const { pluralName } = getTableNames(table);
|
|
92
|
+
return `use${ucFirst(pluralName)}Query`;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Generate hook function name for single item query
|
|
96
|
+
* e.g., "useCarQuery"
|
|
97
|
+
*/
|
|
98
|
+
function getSingleQueryHookName(table) {
|
|
99
|
+
const { singularName } = getTableNames(table);
|
|
100
|
+
return `use${ucFirst(singularName)}Query`;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Generate hook function name for create mutation
|
|
104
|
+
* e.g., "useCreateCarMutation"
|
|
105
|
+
*/
|
|
106
|
+
function getCreateMutationHookName(table) {
|
|
107
|
+
const { typeName } = getTableNames(table);
|
|
108
|
+
return `useCreate${typeName}Mutation`;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Generate hook function name for update mutation
|
|
112
|
+
* e.g., "useUpdateCarMutation"
|
|
113
|
+
*/
|
|
114
|
+
function getUpdateMutationHookName(table) {
|
|
115
|
+
const { typeName } = getTableNames(table);
|
|
116
|
+
return `useUpdate${typeName}Mutation`;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Generate hook function name for delete mutation
|
|
120
|
+
* e.g., "useDeleteCarMutation"
|
|
121
|
+
*/
|
|
122
|
+
function getDeleteMutationHookName(table) {
|
|
123
|
+
const { typeName } = getTableNames(table);
|
|
124
|
+
return `useDelete${typeName}Mutation`;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Generate file name for list query hook
|
|
128
|
+
* e.g., "useCarsQuery.ts"
|
|
129
|
+
*/
|
|
130
|
+
function getListQueryFileName(table) {
|
|
131
|
+
return `${getListQueryHookName(table)}.ts`;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Generate file name for single query hook
|
|
135
|
+
* e.g., "useCarQuery.ts"
|
|
136
|
+
*/
|
|
137
|
+
function getSingleQueryFileName(table) {
|
|
138
|
+
return `${getSingleQueryHookName(table)}.ts`;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Generate file name for create mutation hook
|
|
142
|
+
*/
|
|
143
|
+
function getCreateMutationFileName(table) {
|
|
144
|
+
return `${getCreateMutationHookName(table)}.ts`;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Generate file name for update mutation hook
|
|
148
|
+
*/
|
|
149
|
+
function getUpdateMutationFileName(table) {
|
|
150
|
+
return `${getUpdateMutationHookName(table)}.ts`;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Generate file name for delete mutation hook
|
|
154
|
+
*/
|
|
155
|
+
function getDeleteMutationFileName(table) {
|
|
156
|
+
return `${getDeleteMutationHookName(table)}.ts`;
|
|
157
|
+
}
|
|
158
|
+
// ============================================================================
|
|
159
|
+
// GraphQL operation names
|
|
160
|
+
// ============================================================================
|
|
161
|
+
/**
|
|
162
|
+
* Get the GraphQL query name for fetching all rows
|
|
163
|
+
* Uses inflection from _meta, falls back to convention
|
|
164
|
+
*/
|
|
165
|
+
function getAllRowsQueryName(table) {
|
|
166
|
+
return table.query?.all || table.inflection?.allRows || lcFirst(table.name) + 's';
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get the GraphQL query name for fetching single row
|
|
170
|
+
*/
|
|
171
|
+
function getSingleRowQueryName(table) {
|
|
172
|
+
return table.query?.one || table.inflection?.tableFieldName || lcFirst(table.name);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Get the GraphQL mutation name for creating
|
|
176
|
+
*/
|
|
177
|
+
function getCreateMutationName(table) {
|
|
178
|
+
return table.query?.create || `create${table.name}`;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Get the GraphQL mutation name for updating
|
|
182
|
+
*/
|
|
183
|
+
function getUpdateMutationName(table) {
|
|
184
|
+
return table.query?.update || `update${table.name}`;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get the GraphQL mutation name for deleting
|
|
188
|
+
*/
|
|
189
|
+
function getDeleteMutationName(table) {
|
|
190
|
+
return table.query?.delete || `delete${table.name}`;
|
|
191
|
+
}
|
|
192
|
+
// ============================================================================
|
|
193
|
+
// Type names
|
|
194
|
+
// ============================================================================
|
|
195
|
+
/**
|
|
196
|
+
* Get PostGraphile filter type name
|
|
197
|
+
* e.g., "CarFilter"
|
|
198
|
+
*/
|
|
199
|
+
function getFilterTypeName(table) {
|
|
200
|
+
return table.inflection?.filterType || `${table.name}Filter`;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get PostGraphile OrderBy enum type name
|
|
204
|
+
* e.g., "CarsOrderBy"
|
|
205
|
+
*/
|
|
206
|
+
function getOrderByTypeName(table) {
|
|
207
|
+
return table.inflection?.orderByType || `${table.name}sOrderBy`;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Get PostGraphile create input type name
|
|
211
|
+
* e.g., "CreateCarInput"
|
|
212
|
+
*/
|
|
213
|
+
function getCreateInputTypeName(table) {
|
|
214
|
+
return table.inflection?.createInputType || `Create${table.name}Input`;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get PostGraphile patch type name for updates
|
|
218
|
+
* e.g., "CarPatch"
|
|
219
|
+
*/
|
|
220
|
+
function getPatchTypeName(table) {
|
|
221
|
+
return table.inflection?.patchType || `${table.name}Patch`;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Get PostGraphile update input type name
|
|
225
|
+
* e.g., "UpdateCarInput"
|
|
226
|
+
*/
|
|
227
|
+
function getUpdateInputTypeName(table) {
|
|
228
|
+
return `Update${table.name}Input`;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get PostGraphile delete input type name
|
|
232
|
+
* e.g., "DeleteCarInput"
|
|
233
|
+
*/
|
|
234
|
+
function getDeleteInputTypeName(table) {
|
|
235
|
+
return `Delete${table.name}Input`;
|
|
236
|
+
}
|
|
237
|
+
// ============================================================================
|
|
238
|
+
// Type mapping: GraphQL → TypeScript
|
|
239
|
+
// ============================================================================
|
|
240
|
+
/**
|
|
241
|
+
* Convert GraphQL type to TypeScript type
|
|
242
|
+
*/
|
|
243
|
+
function gqlTypeToTs(gqlType, isArray = false) {
|
|
244
|
+
// Remove non-null markers
|
|
245
|
+
const cleanType = gqlType.replace(/!/g, '');
|
|
246
|
+
// Look up in map, fallback to the type name itself (custom type)
|
|
247
|
+
const tsType = (0, scalars_1.scalarToTsType)(cleanType, { unknownScalar: 'name' });
|
|
248
|
+
return isArray ? `${tsType}[]` : tsType;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Convert CleanFieldType to TypeScript type string
|
|
252
|
+
*/
|
|
253
|
+
function fieldTypeToTs(fieldType) {
|
|
254
|
+
return gqlTypeToTs(fieldType.gqlType, fieldType.isArray);
|
|
255
|
+
}
|
|
256
|
+
// ============================================================================
|
|
257
|
+
// Type mapping: GraphQL → Filter type
|
|
258
|
+
// ============================================================================
|
|
259
|
+
/**
|
|
260
|
+
* Get the PostGraphile filter type for a GraphQL scalar
|
|
261
|
+
*/
|
|
262
|
+
function getScalarFilterType(gqlType) {
|
|
263
|
+
const cleanType = gqlType.replace(/!/g, '');
|
|
264
|
+
return (0, scalars_1.scalarToFilterType)(cleanType);
|
|
265
|
+
}
|
|
266
|
+
// ============================================================================
|
|
267
|
+
// Field filtering utilities
|
|
268
|
+
// ============================================================================
|
|
269
|
+
/**
|
|
270
|
+
* Check if a field is a relation field (not a scalar)
|
|
271
|
+
*/
|
|
272
|
+
function isRelationField(fieldName, table) {
|
|
273
|
+
const { belongsTo, hasOne, hasMany, manyToMany } = table.relations;
|
|
274
|
+
return (belongsTo.some((r) => r.fieldName === fieldName) ||
|
|
275
|
+
hasOne.some((r) => r.fieldName === fieldName) ||
|
|
276
|
+
hasMany.some((r) => r.fieldName === fieldName) ||
|
|
277
|
+
manyToMany.some((r) => r.fieldName === fieldName));
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Get only scalar fields (non-relation fields)
|
|
281
|
+
*/
|
|
282
|
+
function getScalarFields(table) {
|
|
283
|
+
return table.fields.filter((f) => !isRelationField(f.name, table));
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Get primary key field names
|
|
287
|
+
*/
|
|
288
|
+
function getPrimaryKeyFields(table) {
|
|
289
|
+
const pk = table.constraints?.primaryKey?.[0];
|
|
290
|
+
if (!pk)
|
|
291
|
+
return ['id']; // Default assumption
|
|
292
|
+
return pk.fields.map((f) => f.name);
|
|
293
|
+
}
|
|
294
|
+
// ============================================================================
|
|
295
|
+
// Query key generation
|
|
296
|
+
// ============================================================================
|
|
297
|
+
/**
|
|
298
|
+
* Generate query key prefix for a table
|
|
299
|
+
* e.g., "cars" for list queries, "car" for detail queries
|
|
300
|
+
*/
|
|
301
|
+
function getQueryKeyPrefix(table) {
|
|
302
|
+
return lcFirst(table.name);
|
|
303
|
+
}
|
|
304
|
+
// ============================================================================
|
|
305
|
+
// Code generation helpers
|
|
306
|
+
// ============================================================================
|
|
307
|
+
/**
|
|
308
|
+
* Generate a doc comment header for generated files
|
|
309
|
+
*/
|
|
310
|
+
function getGeneratedFileHeader(description) {
|
|
311
|
+
return `/**
|
|
312
|
+
* ${description}
|
|
313
|
+
* @generated by @constructive-io/graphql-codegen
|
|
314
|
+
* DO NOT EDIT - changes will be overwritten
|
|
315
|
+
*/`;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Indent a multi-line string
|
|
319
|
+
*/
|
|
320
|
+
function indent(str, spaces = 2) {
|
|
321
|
+
const pad = ' '.repeat(spaces);
|
|
322
|
+
return str
|
|
323
|
+
.split('\n')
|
|
324
|
+
.map((line) => (line.trim() ? pad + line : line))
|
|
325
|
+
.join('\n');
|
|
326
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate ORM command - generates Prisma-like ORM client
|
|
3
|
+
*
|
|
4
|
+
* This command:
|
|
5
|
+
* 1. Fetches _meta query for table-based CRUD operations
|
|
6
|
+
* 2. Fetches __schema introspection for custom operations
|
|
7
|
+
* 3. Generates a Prisma-like ORM client with fluent API
|
|
8
|
+
*/
|
|
9
|
+
export interface GenerateOrmOptions {
|
|
10
|
+
/** Path to config file */
|
|
11
|
+
config?: string;
|
|
12
|
+
/** GraphQL endpoint URL (overrides config) */
|
|
13
|
+
endpoint?: string;
|
|
14
|
+
/** Output directory (overrides config) */
|
|
15
|
+
output?: string;
|
|
16
|
+
/** Authorization header */
|
|
17
|
+
authorization?: string;
|
|
18
|
+
/** Verbose output */
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
/** Dry run - don't write files */
|
|
21
|
+
dryRun?: boolean;
|
|
22
|
+
/** Skip custom operations (only generate table CRUD) */
|
|
23
|
+
skipCustomOperations?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface GenerateOrmResult {
|
|
26
|
+
success: boolean;
|
|
27
|
+
message: string;
|
|
28
|
+
tables?: string[];
|
|
29
|
+
customQueries?: string[];
|
|
30
|
+
customMutations?: string[];
|
|
31
|
+
filesWritten?: string[];
|
|
32
|
+
errors?: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Execute the generate-orm command
|
|
36
|
+
*/
|
|
37
|
+
export declare function generateOrmCommand(options?: GenerateOrmOptions): Promise<GenerateOrmResult>;
|