@slingr/cli 0.0.2 → 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/LICENSE.txt +202 -0
- package/README.md +490 -319
- package/bin/dev.cmd +2 -2
- package/bin/dev.js +5 -5
- package/bin/run.cmd +2 -2
- package/bin/run.js +4 -4
- package/bin/slingr +1 -0
- package/dist/commands/build.d.ts +20 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +206 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/create-app.d.ts +0 -1
- package/dist/commands/create-app.d.ts.map +1 -1
- package/dist/commands/create-app.js +38 -57
- package/dist/commands/create-app.js.map +1 -1
- package/dist/commands/debug.d.ts +28 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +474 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/ds.d.ts +14 -1
- package/dist/commands/ds.d.ts.map +1 -1
- package/dist/commands/ds.js +450 -121
- package/dist/commands/ds.js.map +1 -1
- package/dist/commands/gql.d.ts +1 -1
- package/dist/commands/gql.d.ts.map +1 -1
- package/dist/commands/gql.js +190 -184
- package/dist/commands/gql.js.map +1 -1
- package/dist/commands/infra/down.d.ts.map +1 -1
- package/dist/commands/infra/down.js +8 -7
- package/dist/commands/infra/down.js.map +1 -1
- package/dist/commands/infra/up.d.ts.map +1 -1
- package/dist/commands/infra/up.js +8 -7
- package/dist/commands/infra/up.js.map +1 -1
- package/dist/commands/infra/update.d.ts +1 -0
- package/dist/commands/infra/update.d.ts.map +1 -1
- package/dist/commands/infra/update.js +33 -69
- package/dist/commands/infra/update.js.map +1 -1
- package/dist/commands/run.d.ts +29 -2
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +628 -130
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +34 -71
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/sync-metadata.d.ts +15 -0
- package/dist/commands/sync-metadata.d.ts.map +1 -0
- package/dist/commands/sync-metadata.js +225 -0
- package/dist/commands/sync-metadata.js.map +1 -0
- package/dist/commands/users.d.ts +30 -0
- package/dist/commands/users.d.ts.map +1 -0
- package/dist/commands/users.js +472 -0
- package/dist/commands/users.js.map +1 -0
- package/dist/commands/views.d.ts +11 -0
- package/dist/commands/views.d.ts.map +1 -0
- package/dist/commands/views.js +73 -0
- package/dist/commands/views.js.map +1 -0
- package/dist/projectStructure.d.ts +2 -2
- package/dist/projectStructure.d.ts.map +1 -1
- package/dist/projectStructure.js +281 -69
- package/dist/projectStructure.js.map +1 -1
- package/dist/scripts/generate-metadata.d.ts +13 -0
- package/dist/scripts/generate-metadata.d.ts.map +1 -0
- package/dist/scripts/generate-metadata.js +412 -0
- package/dist/scripts/generate-metadata.js.map +1 -0
- package/dist/scripts/generate-metadata.ts +498 -0
- package/dist/scripts/generate-schema.d.ts +1 -1
- package/dist/scripts/generate-schema.js +168 -74
- package/dist/scripts/generate-schema.js.map +1 -1
- package/dist/scripts/generate-schema.ts +258 -143
- package/dist/templates/.env.template +23 -0
- package/dist/templates/.firebaserc.template +5 -0
- package/dist/templates/.github/copilot-instructions.md.template +652 -17
- package/dist/templates/backend/Dockerfile.template +30 -0
- package/dist/templates/config/datasource.ts.template +12 -9
- package/dist/templates/config/jest.config.ts +30 -30
- package/dist/templates/config/jest.setup.ts +1 -1
- package/dist/templates/config/tsconfig.json.template +50 -29
- package/dist/templates/dataSources/mysql.ts.template +16 -13
- package/dist/templates/dataSources/postgres.ts.template +15 -13
- package/dist/templates/dataset-generator-script.ts.template +139 -139
- package/dist/templates/datasets/mysql-default/.slingr-schema.json.template +5 -0
- package/dist/templates/datasets/mysql-default/Address.jsonl.template +3 -3
- package/dist/templates/datasets/mysql-default/App.jsonl.template +4 -4
- package/dist/templates/datasets/mysql-default/Company.jsonl.template +3 -3
- package/dist/templates/datasets/mysql-default/Person.jsonl.template +2 -2
- package/dist/templates/datasets/mysql-default/User.jsonl.template +1 -0
- package/dist/templates/datasets/mysql-default/instructions.md.template +1 -0
- package/dist/templates/datasets/postgres-default/.slingr-schema.json.template +5 -0
- package/dist/templates/datasets/postgres-default/Address.jsonl.template +3 -3
- package/dist/templates/datasets/postgres-default/App.jsonl.template +4 -4
- package/dist/templates/datasets/postgres-default/Company.jsonl.template +3 -3
- package/dist/templates/datasets/postgres-default/Person.jsonl.template +2 -2
- package/dist/templates/datasets/postgres-default/User.jsonl.template +1 -0
- package/dist/templates/datasets/postgres-default/instructions.md.template +1 -0
- package/dist/templates/docker-compose.prod-test.yml.template +32 -0
- package/dist/templates/docker-compose.yml.template +24 -0
- package/dist/templates/docs/app-description.md.template +33 -33
- package/dist/templates/firebase.json.template +68 -0
- package/dist/templates/frontend/.umirc.ts.template +23 -0
- package/dist/templates/frontend/package.json.template +45 -0
- package/dist/templates/frontend/public/config.json +6 -0
- package/dist/templates/frontend/public/logo.svg +6 -0
- package/dist/templates/frontend/src/app.tsx.template +44 -0
- package/dist/templates/frontend/src/global.less.template +117 -0
- package/dist/templates/frontend/src/layouts/MainLayout.tsx.template +75 -0
- package/dist/templates/frontend/src/types/graphql-augmentation.d.ts.template +44 -0
- package/dist/templates/frontend/src/views/customViews/user/UserCreateView.tsx.template +18 -0
- package/dist/templates/frontend/src/views/customViews/user/UserEditView.tsx.template +29 -0
- package/dist/templates/frontend/src/views/customViews/user/UserReadView.tsx.template +24 -0
- package/dist/templates/frontend/src/views/customViews/user/UserTableView.tsx.template +38 -0
- package/dist/templates/frontend/src/views/customViews/welcome.tsx.template +34 -0
- package/dist/templates/frontend/tsconfig.json.template +50 -0
- package/dist/templates/gql/codegen.yml.template +25 -25
- package/dist/templates/gql/index.ts.template +17 -24
- package/dist/templates/gql/operations.graphql.template +30 -30
- package/dist/templates/ops/README.md.template +1045 -0
- package/dist/templates/ops/cloudbuild.yaml.template +161 -0
- package/dist/templates/ops/scripts/_utils.js.template +217 -0
- package/dist/templates/ops/scripts/deploy.js.template +145 -0
- package/dist/templates/ops/scripts/setup-gcp.js.template +330 -0
- package/dist/templates/ops/scripts/setup-secrets.js.template +76 -0
- package/dist/templates/ops/scripts/test-prod-local.js.template +49 -0
- package/dist/templates/package.json.template +50 -38
- package/dist/templates/pnpm-workspace.yaml.template +3 -0
- package/dist/templates/prompt-analysis.md.template +110 -110
- package/dist/templates/prompt-script-generation.md.template +258 -258
- package/dist/templates/src/Address.ts.template +28 -31
- package/dist/templates/src/App.ts.template +17 -61
- package/dist/templates/src/Company.ts.template +41 -47
- package/dist/templates/src/Models.test.ts.template +654 -654
- package/dist/templates/src/Person.test.ts.template +289 -289
- package/dist/templates/src/Person.ts.template +90 -105
- package/dist/templates/src/actions/index.ts.template +11 -11
- package/dist/templates/src/auth/permissions.ts.template +34 -0
- package/dist/templates/src/data/App.ts.template +48 -0
- package/dist/templates/src/data/User.ts.template +35 -0
- package/dist/templates/src/types/gql.d.ts.template +17 -17
- package/dist/templates/vscode/extensions.json +4 -3
- package/dist/templates/vscode/settings.json +17 -11
- package/dist/templates/workspace-package.json.template +21 -0
- package/dist/utils/buildCache.d.ts +12 -0
- package/dist/utils/buildCache.d.ts.map +1 -0
- package/dist/utils/buildCache.js +102 -0
- package/dist/utils/buildCache.js.map +1 -0
- package/dist/utils/checkFramework.d.ts +27 -0
- package/dist/utils/checkFramework.d.ts.map +1 -0
- package/dist/utils/checkFramework.js +104 -0
- package/dist/utils/checkFramework.js.map +1 -0
- package/dist/utils/datasourceParser.d.ts +11 -0
- package/dist/utils/datasourceParser.d.ts.map +1 -1
- package/dist/utils/datasourceParser.js +154 -56
- package/dist/utils/datasourceParser.js.map +1 -1
- package/dist/utils/dockerManager.d.ts +25 -0
- package/dist/utils/dockerManager.d.ts.map +1 -0
- package/dist/utils/dockerManager.js +281 -0
- package/dist/utils/dockerManager.js.map +1 -0
- package/dist/utils/infraFileParser.d.ts +26 -0
- package/dist/utils/infraFileParser.d.ts.map +1 -0
- package/dist/utils/infraFileParser.js +75 -0
- package/dist/utils/infraFileParser.js.map +1 -0
- package/dist/utils/jsonlLoader.d.ts +91 -12
- package/dist/utils/jsonlLoader.d.ts.map +1 -1
- package/dist/utils/jsonlLoader.js +674 -63
- package/dist/utils/jsonlLoader.js.map +1 -1
- package/dist/utils/model-analyzer.d.ts.map +1 -1
- package/dist/utils/model-analyzer.js +67 -13
- package/dist/utils/model-analyzer.js.map +1 -1
- package/dist/utils/userManagement.d.ts +57 -0
- package/dist/utils/userManagement.d.ts.map +1 -0
- package/dist/utils/userManagement.js +288 -0
- package/dist/utils/userManagement.js.map +1 -0
- package/dist/utils/viewsGenerator.d.ts +15 -0
- package/dist/utils/viewsGenerator.d.ts.map +1 -0
- package/dist/utils/viewsGenerator.js +311 -0
- package/dist/utils/viewsGenerator.js.map +1 -0
- package/oclif.manifest.json +445 -20
- package/package.json +29 -27
- package/src/templates/.env.template +23 -0
- package/src/templates/.firebaserc.template +5 -0
- package/src/templates/.github/copilot-instructions.md.template +652 -17
- package/src/templates/backend/Dockerfile.template +30 -0
- package/src/templates/config/datasource.ts.template +12 -9
- package/src/templates/config/jest.config.ts +30 -30
- package/src/templates/config/jest.setup.ts +1 -1
- package/src/templates/config/tsconfig.json.template +50 -29
- package/src/templates/dataSources/mysql.ts.template +16 -13
- package/src/templates/dataSources/postgres.ts.template +15 -13
- package/src/templates/dataset-generator-script.ts.template +139 -139
- package/src/templates/datasets/mysql-default/.slingr-schema.json.template +5 -0
- package/src/templates/datasets/mysql-default/Address.jsonl.template +3 -3
- package/src/templates/datasets/mysql-default/App.jsonl.template +4 -4
- package/src/templates/datasets/mysql-default/Company.jsonl.template +3 -3
- package/src/templates/datasets/mysql-default/Person.jsonl.template +2 -2
- package/src/templates/datasets/mysql-default/User.jsonl.template +1 -0
- package/src/templates/datasets/mysql-default/instructions.md.template +1 -0
- package/src/templates/datasets/postgres-default/.slingr-schema.json.template +5 -0
- package/src/templates/datasets/postgres-default/Address.jsonl.template +3 -3
- package/src/templates/datasets/postgres-default/App.jsonl.template +4 -4
- package/src/templates/datasets/postgres-default/Company.jsonl.template +3 -3
- package/src/templates/datasets/postgres-default/Person.jsonl.template +2 -2
- package/src/templates/datasets/postgres-default/User.jsonl.template +1 -0
- package/src/templates/datasets/postgres-default/instructions.md.template +1 -0
- package/src/templates/docker-compose.prod-test.yml.template +32 -0
- package/src/templates/docker-compose.yml.template +24 -0
- package/src/templates/docs/app-description.md.template +33 -33
- package/src/templates/firebase.json.template +68 -0
- package/src/templates/frontend/.umirc.ts.template +23 -0
- package/src/templates/frontend/package.json.template +45 -0
- package/src/templates/frontend/public/config.json +6 -0
- package/src/templates/frontend/public/logo.svg +6 -0
- package/src/templates/frontend/src/app.tsx.template +44 -0
- package/src/templates/frontend/src/global.less.template +117 -0
- package/src/templates/frontend/src/layouts/MainLayout.tsx.template +75 -0
- package/src/templates/frontend/src/types/graphql-augmentation.d.ts.template +44 -0
- package/src/templates/frontend/src/views/customViews/user/UserCreateView.tsx.template +18 -0
- package/src/templates/frontend/src/views/customViews/user/UserEditView.tsx.template +29 -0
- package/src/templates/frontend/src/views/customViews/user/UserReadView.tsx.template +24 -0
- package/src/templates/frontend/src/views/customViews/user/UserTableView.tsx.template +38 -0
- package/src/templates/frontend/src/views/customViews/welcome.tsx.template +34 -0
- package/src/templates/frontend/tsconfig.json.template +50 -0
- package/src/templates/gql/codegen.yml.template +25 -25
- package/src/templates/gql/index.ts.template +17 -24
- package/src/templates/gql/operations.graphql.template +30 -30
- package/src/templates/ops/README.md.template +1045 -0
- package/src/templates/ops/cloudbuild.yaml.template +161 -0
- package/src/templates/ops/scripts/_utils.js.template +217 -0
- package/src/templates/ops/scripts/deploy.js.template +145 -0
- package/src/templates/ops/scripts/setup-gcp.js.template +330 -0
- package/src/templates/ops/scripts/setup-secrets.js.template +76 -0
- package/src/templates/ops/scripts/test-prod-local.js.template +49 -0
- package/src/templates/package.json.template +50 -38
- package/src/templates/pnpm-workspace.yaml.template +3 -0
- package/src/templates/prompt-analysis.md.template +110 -110
- package/src/templates/prompt-script-generation.md.template +258 -258
- package/src/templates/src/Address.ts.template +28 -31
- package/src/templates/src/App.ts.template +17 -61
- package/src/templates/src/Company.ts.template +41 -47
- package/src/templates/src/Models.test.ts.template +654 -654
- package/src/templates/src/Person.test.ts.template +289 -289
- package/src/templates/src/Person.ts.template +90 -105
- package/src/templates/src/actions/index.ts.template +11 -11
- package/src/templates/src/auth/permissions.ts.template +34 -0
- package/src/templates/src/data/App.ts.template +48 -0
- package/src/templates/src/data/User.ts.template +35 -0
- package/src/templates/src/types/gql.d.ts.template +17 -17
- package/src/templates/vscode/extensions.json +4 -3
- package/src/templates/vscode/settings.json +17 -11
- package/src/templates/workspace-package.json.template +21 -0
- package/dist/templates/src/index.ts +0 -66
- package/src/templates/src/index.ts +0 -66
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { toolbar, TableView, TableViewComponent } from '@slingr/framework-frontend';
|
|
2
|
+
import { User } from '@gql';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* UserTableView
|
|
6
|
+
*
|
|
7
|
+
* Default table view for the User model.
|
|
8
|
+
* Path: /users
|
|
9
|
+
*/
|
|
10
|
+
@TableView<User>({
|
|
11
|
+
path: '/users',
|
|
12
|
+
model: 'User',
|
|
13
|
+
header: {
|
|
14
|
+
title: 'Users',
|
|
15
|
+
subTitle: 'Manage system users',
|
|
16
|
+
toolbar: {
|
|
17
|
+
buttons: [toolbar<User>()],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
tableOptions: {
|
|
21
|
+
columns: [
|
|
22
|
+
{ field: 'firstName', title: 'First Name', sorting: true, filtering: true },
|
|
23
|
+
{ field: 'lastName', title: 'Last Name', sorting: true, filtering: true },
|
|
24
|
+
{ field: 'fullName', title: 'Full Name', sorting: true, filtering: true },
|
|
25
|
+
{ field: 'email', title: 'Email', sorting: true, filtering: true },
|
|
26
|
+
{ field: 'status', title: 'Status', sorting: true, filtering: true },
|
|
27
|
+
{ field: 'roles', title: 'Roles', sorting: false, filtering: true },
|
|
28
|
+
{ field: 'createdAt', title: 'Created At', sorting: true, filtering: false },
|
|
29
|
+
{ field: 'updatedAt', title: 'Updated At', sorting: true, filtering: false },
|
|
30
|
+
],
|
|
31
|
+
pagination: { pageSize: 10 },
|
|
32
|
+
selection: { enabled: true, type: 'multiple' },
|
|
33
|
+
rowToolbar: {
|
|
34
|
+
buttons: toolbar<User>(),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
export default class UserTableView extends TableViewComponent<User> {}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CustomView } from '@slingr/framework-frontend';
|
|
3
|
+
import { Card, Typography } from 'antd';
|
|
4
|
+
|
|
5
|
+
const { Title, Paragraph } = Typography;
|
|
6
|
+
|
|
7
|
+
@CustomView({
|
|
8
|
+
path: '/',
|
|
9
|
+
name: 'Welcome',
|
|
10
|
+
})
|
|
11
|
+
export default class WelcomeView extends React.Component {
|
|
12
|
+
render() {
|
|
13
|
+
return (
|
|
14
|
+
<Card>
|
|
15
|
+
<Title level={2}>Welcome to {{APP_NAME}}!</Title>
|
|
16
|
+
<Paragraph>
|
|
17
|
+
Your Slingr application has been successfully created and is now running.
|
|
18
|
+
</Paragraph>
|
|
19
|
+
<Paragraph>
|
|
20
|
+
This is a custom view at the root path. You can start building your application by:
|
|
21
|
+
</Paragraph>
|
|
22
|
+
<ul>
|
|
23
|
+
<li>Adding more custom views in <code>frontend/src/views/customViews/</code></li>
|
|
24
|
+
<li>Defining data models in <code>backend/src/data/</code></li>
|
|
25
|
+
<li>Creating custom actions in <code>backend/src/actions/</code></li>
|
|
26
|
+
<li>Configuring permissions in <code>backend/src/auth/permissions.ts</code></li>
|
|
27
|
+
</ul>
|
|
28
|
+
<Paragraph>
|
|
29
|
+
Check out the documentation to learn more about building with Slingr!
|
|
30
|
+
</Paragraph>
|
|
31
|
+
</Card>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"skipDefaultLibCheck": true,
|
|
12
|
+
"preserveSymlinks": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"paths": {
|
|
18
|
+
"@/*": ["./src/*"],
|
|
19
|
+
"@gql": [
|
|
20
|
+
"./generated/gql/index.ts"
|
|
21
|
+
],
|
|
22
|
+
"@gql/*": [
|
|
23
|
+
"./generated/gql/*"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"noImplicitOverride": true
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"src/**/*",
|
|
30
|
+
"generated/**/*"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"node_modules",
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"watchOptions": {
|
|
37
|
+
"watchFile": "useFsEventsOnParentDirectory",
|
|
38
|
+
"watchDirectory": "useFsEvents",
|
|
39
|
+
"fallbackPolling": "dynamicpriority",
|
|
40
|
+
"synchronousWatchDirectory": false,
|
|
41
|
+
"excludeDirectories": [
|
|
42
|
+
"**/node_modules",
|
|
43
|
+
"**/.git",
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"excludeFiles": [
|
|
47
|
+
"**/node_modules/**/package.json"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# GraphQL Code Generator configuration
|
|
2
|
-
# This file is automatically generated by Slingr CLI
|
|
3
|
-
# You can customize it according to your needs
|
|
4
|
-
|
|
5
|
-
schema: './generated/gql/schema.graphql'
|
|
6
|
-
documents: './operations.graphql'
|
|
7
|
-
generates:
|
|
8
|
-
./generated/gql/sdk.ts:
|
|
9
|
-
plugins:
|
|
10
|
-
- 'typescript'
|
|
11
|
-
- 'typescript-operations'
|
|
12
|
-
- 'typescript-graphql-request'
|
|
13
|
-
config:
|
|
14
|
-
# Generate a SDK that works with graphql-request
|
|
15
|
-
rawRequest: false
|
|
16
|
-
# Generate typed document nodes
|
|
17
|
-
documentMode: 'documentNode'
|
|
18
|
-
# Use GraphQLClient from graphql-request
|
|
19
|
-
gqlImport: 'graphql-request#gql'
|
|
20
|
-
# Add helpful comments
|
|
21
|
-
addDocumentNodeToSchema: true
|
|
22
|
-
# Generate scalars as strings by default
|
|
23
|
-
scalars:
|
|
24
|
-
DateTime: string
|
|
25
|
-
Upload: File
|
|
1
|
+
# GraphQL Code Generator configuration
|
|
2
|
+
# This file is automatically generated by Slingr CLI
|
|
3
|
+
# You can customize it according to your needs
|
|
4
|
+
|
|
5
|
+
schema: './generated/gql/schema.graphql'
|
|
6
|
+
documents: './generated/gql/operations.graphql'
|
|
7
|
+
generates:
|
|
8
|
+
./generated/gql/sdk.ts:
|
|
9
|
+
plugins:
|
|
10
|
+
- 'typescript'
|
|
11
|
+
- 'typescript-operations'
|
|
12
|
+
- 'typescript-graphql-request'
|
|
13
|
+
config:
|
|
14
|
+
# Generate a SDK that works with graphql-request
|
|
15
|
+
rawRequest: false
|
|
16
|
+
# Generate typed document nodes
|
|
17
|
+
documentMode: 'documentNode'
|
|
18
|
+
# Use GraphQLClient from graphql-request
|
|
19
|
+
gqlImport: 'graphql-request#gql'
|
|
20
|
+
# Add helpful comments
|
|
21
|
+
addDocumentNodeToSchema: true
|
|
22
|
+
# Generate scalars as strings by default
|
|
23
|
+
scalars:
|
|
24
|
+
DateTime: string
|
|
25
|
+
Upload: File
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL
|
|
3
|
-
*
|
|
4
|
-
* This module provides
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const gql = getSdk(defaultClient);
|
|
19
|
-
|
|
20
|
-
export default gql;
|
|
21
|
-
export * from './sdk';
|
|
22
|
-
|
|
23
|
-
// Also export a function to create SDK with custom client
|
|
24
|
-
export const createGql = (client: GraphQLClient) => getSdk(client);
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL Types & Metadata - Auto-generated by Slingr CLI
|
|
3
|
+
*
|
|
4
|
+
* This module provides TypeScript types for your GraphQL schema,
|
|
5
|
+
* along with model field metadata and action metadata.
|
|
6
|
+
* Use these types with any GraphQL client (graphql-request, Apollo, etc.).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { registerModelsMetadata, registerActionsMetadata } from '@slingr/framework-frontend';
|
|
10
|
+
import { modelsMetadata, actionsMetadata } from './metadata';
|
|
11
|
+
|
|
12
|
+
// Register metadata for framework components (QueryBuilder auto-expansion)
|
|
13
|
+
registerModelsMetadata(modelsMetadata);
|
|
14
|
+
registerActionsMetadata(actionsMetadata);
|
|
15
|
+
|
|
16
|
+
export * from './types';
|
|
17
|
+
export * from './metadata';
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# GraphQL Operations for SDK Generation
|
|
2
|
-
#
|
|
3
|
-
# This file defines the queries, mutations, and subscriptions
|
|
4
|
-
# that will be available in your generated SDK.
|
|
5
|
-
#
|
|
6
|
-
# IMPORTANT: This is YOUR file - customize it with your own operations!
|
|
7
|
-
#
|
|
8
|
-
# The SDK generator will create typed functions for each operation defined here.
|
|
9
|
-
# Add your custom queries, mutations, and subscriptions below.
|
|
10
|
-
#
|
|
11
|
-
# Example:
|
|
12
|
-
# query GetUser($id: ID!) {
|
|
13
|
-
# user(id: $id) {
|
|
14
|
-
# id
|
|
15
|
-
# name
|
|
16
|
-
# email
|
|
17
|
-
# }
|
|
18
|
-
# }
|
|
19
|
-
#
|
|
20
|
-
# mutation CreateUser($input: CreateUserInput!) {
|
|
21
|
-
# createUser(input: $input) {
|
|
22
|
-
# id
|
|
23
|
-
# name
|
|
24
|
-
# }
|
|
25
|
-
# }
|
|
26
|
-
|
|
27
|
-
# Sample query (replace or remove this)
|
|
28
|
-
query TestQuery {
|
|
29
|
-
test
|
|
30
|
-
}
|
|
1
|
+
# GraphQL Operations for SDK Generation
|
|
2
|
+
#
|
|
3
|
+
# This file defines the queries, mutations, and subscriptions
|
|
4
|
+
# that will be available in your generated SDK.
|
|
5
|
+
#
|
|
6
|
+
# IMPORTANT: This is YOUR file - customize it with your own operations!
|
|
7
|
+
#
|
|
8
|
+
# The SDK generator will create typed functions for each operation defined here.
|
|
9
|
+
# Add your custom queries, mutations, and subscriptions below.
|
|
10
|
+
#
|
|
11
|
+
# Example:
|
|
12
|
+
# query GetUser($id: ID!) {
|
|
13
|
+
# user(id: $id) {
|
|
14
|
+
# id
|
|
15
|
+
# name
|
|
16
|
+
# email
|
|
17
|
+
# }
|
|
18
|
+
# }
|
|
19
|
+
#
|
|
20
|
+
# mutation CreateUser($input: CreateUserInput!) {
|
|
21
|
+
# createUser(input: $input) {
|
|
22
|
+
# id
|
|
23
|
+
# name
|
|
24
|
+
# }
|
|
25
|
+
# }
|
|
26
|
+
|
|
27
|
+
# Sample query (replace or remove this)
|
|
28
|
+
query TestQuery {
|
|
29
|
+
test
|
|
30
|
+
}
|