nitro-graphql 2.0.0-beta.72 → 2.0.0-beta.73
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 -1
- package/dist/cli/adapter.d.mts +0 -3
- package/dist/cli/adapter.mjs +6 -29
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/config.d.mts +4 -5
- package/dist/cli/config.mjs +3 -1
- package/dist/cli/index.d.mts +3 -6
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/server/graphql-handler.mjs +2 -1
- package/dist/cli/server/watcher.mjs +1 -1
- package/dist/core/codegen/client.d.mts +4 -27
- package/dist/core/codegen/client.mjs +26 -445
- package/dist/core/codegen/file-header.d.mts +7 -0
- package/dist/core/codegen/file-header.mjs +12 -0
- package/dist/core/codegen/index.d.mts +7 -5
- package/dist/core/codegen/index.mjs +7 -5
- package/dist/core/codegen/{runtime.d.mts → runtime-generator.d.mts} +1 -1
- package/dist/core/codegen/{runtime.mjs → runtime-generator.mjs} +1 -1
- package/dist/core/codegen/schema-loader.d.mts +2 -7
- package/dist/core/codegen/schema-loader.mjs +65 -70
- package/dist/core/codegen/server-type-helpers.d.mts +14 -0
- package/dist/core/codegen/server-type-helpers.mjs +76 -0
- package/dist/core/codegen/server.d.mts +1 -15
- package/dist/core/codegen/server.mjs +15 -105
- package/dist/core/codegen/subscription-extractor.d.mts +20 -0
- package/dist/core/codegen/subscription-extractor.mjs +30 -0
- package/dist/core/codegen/vue-subscription-builder.d.mts +10 -0
- package/dist/core/codegen/vue-subscription-builder.mjs +351 -0
- package/dist/core/constants.d.mts +5 -53
- package/dist/core/constants.mjs +13 -54
- package/dist/core/create-config.d.mts +31 -0
- package/dist/core/create-config.mjs +42 -0
- package/dist/core/debug/index.d.mts +2 -2
- package/dist/core/debug/index.mjs +2 -2
- package/dist/core/debug/template.d.mts +1 -5
- package/dist/core/debug/template.mjs +1 -1
- package/dist/core/extend/loader.d.mts +0 -1
- package/dist/core/extend/loader.mjs +59 -89
- package/dist/core/index.d.mts +22 -17
- package/dist/core/index.mjs +19 -15
- package/dist/core/manifest.mjs +3 -1
- package/dist/core/pubsub/index.d.mts +2 -109
- package/dist/core/pubsub/index.mjs +1 -145
- package/dist/core/pubsub/memory-pubsub.d.mts +109 -0
- package/dist/core/pubsub/memory-pubsub.mjs +146 -0
- package/dist/core/scanning/ast-scanner.mjs +4 -2
- package/dist/core/scanning/directives.mjs +2 -3
- package/dist/core/scanning/documents.d.mts +4 -3
- package/dist/core/scanning/documents.mjs +1 -1
- package/dist/core/scanning/{common.d.mts → file-scanner.d.mts} +1 -1
- package/dist/core/scanning/{common.mjs → file-scanner.mjs} +2 -10
- package/dist/core/scanning/index.d.mts +3 -3
- package/dist/core/scanning/index.mjs +3 -3
- package/dist/core/scanning/resolvers.mjs +8 -9
- package/dist/core/scanning/schemas.d.mts +1 -5
- package/dist/core/scanning/schemas.mjs +2 -24
- package/dist/core/schema/builder.d.mts +4 -2
- package/dist/core/schema/builder.mjs +4 -2
- package/dist/core/schema/index.d.mts +2 -2
- package/dist/core/schema/index.mjs +2 -2
- package/dist/core/server/apollo.d.mts +20 -0
- package/dist/core/server/apollo.mjs +54 -0
- package/dist/core/server/index.d.mts +4 -2
- package/dist/core/server/index.mjs +3 -2
- package/dist/core/server/types.d.mts +7 -14
- package/dist/core/server/types.mjs +15 -1
- package/dist/core/server/yoga.d.mts +1 -7
- package/dist/core/server/yoga.mjs +4 -13
- package/dist/core/types/adapter.d.mts +4 -39
- package/dist/core/types/codegen.d.mts +22 -45
- package/dist/core/types/config.d.mts +33 -121
- package/dist/core/types/define.d.mts +8 -5
- package/dist/core/types/index.d.mts +5 -4
- package/dist/core/types/scanning.d.mts +4 -1
- package/dist/core/types/standard-schema.d.mts +64 -0
- package/dist/core/utils/directive-parser.d.mts +8 -63
- package/dist/core/utils/directive-parser.mjs +114 -166
- package/dist/core/utils/file-io.d.mts +1 -5
- package/dist/core/utils/file-io.mjs +1 -11
- package/dist/core/utils/index.d.mts +5 -4
- package/dist/core/utils/index.mjs +6 -5
- package/dist/core/utils/logger.d.mts +1 -10
- package/dist/core/utils/logger.mjs +1 -19
- package/dist/core/utils/ofetch-templates.mjs +3 -4
- package/dist/core/utils/runtime.d.mts +1 -30
- package/dist/core/utils/runtime.mjs +2 -44
- package/dist/core/utils/string.d.mts +10 -0
- package/dist/core/utils/string.mjs +12 -0
- package/dist/core/watcher/create-watcher.d.mts +103 -0
- package/dist/core/watcher/create-watcher.mjs +143 -0
- package/dist/core/watcher/index.d.mts +2 -107
- package/dist/core/watcher/index.mjs +1 -139
- package/dist/define.d.mts +4 -2
- package/dist/define.mjs +7 -6
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/nitro/adapter.d.mts +6 -10
- package/dist/nitro/adapter.mjs +12 -42
- package/dist/nitro/codegen/client-types.d.mts +12 -0
- package/dist/nitro/codegen/client-types.mjs +73 -0
- package/dist/nitro/codegen/external-types.d.mts +8 -0
- package/dist/nitro/codegen/external-types.mjs +47 -0
- package/dist/nitro/codegen/index.d.mts +4 -0
- package/dist/nitro/codegen/index.mjs +4 -0
- package/dist/nitro/codegen/server-types.d.mts +12 -0
- package/dist/nitro/codegen/server-types.mjs +81 -0
- package/dist/nitro/defaults.d.mts +28 -0
- package/dist/nitro/defaults.mjs +34 -0
- package/dist/nitro/index.d.mts +11 -3
- package/dist/nitro/index.mjs +1 -1
- package/dist/nitro/paths.d.mts +3 -2
- package/dist/nitro/paths.mjs +13 -9
- package/dist/nitro/rollup.mjs +4 -3
- package/dist/nitro/routes/_ws-handler.d.mts +6 -0
- package/dist/nitro/routes/_ws-handler.mjs +49 -0
- package/dist/nitro/routes/apollo-server-ws.d.mts +1 -1
- package/dist/nitro/routes/apollo-server-ws.mjs +9 -44
- package/dist/nitro/routes/apollo-server.d.mts +1 -1
- package/dist/nitro/routes/apollo-server.mjs +16 -55
- package/dist/nitro/routes/debug.d.mts +1 -1
- package/dist/nitro/routes/debug.mjs +1 -0
- package/dist/nitro/routes/graphql-yoga-ws.d.mts +1 -1
- package/dist/nitro/routes/graphql-yoga-ws.mjs +6 -44
- package/dist/nitro/routes/graphql-yoga.mjs +7 -5
- package/dist/nitro/routes/health.mjs +22 -24
- package/dist/nitro/setup/extend-loader.d.mts +6 -5
- package/dist/nitro/setup/extend-loader.mjs +30 -58
- package/dist/nitro/setup/file-watcher.mjs +6 -4
- package/dist/nitro/setup/logging.d.mts +1 -8
- package/dist/nitro/setup/logging.mjs +7 -22
- package/dist/nitro/setup/rollup-integration.mjs +32 -1
- package/dist/nitro/setup/scanner.d.mts +8 -43
- package/dist/nitro/setup/scanner.mjs +56 -58
- package/dist/nitro/setup/security.d.mts +10 -0
- package/dist/nitro/setup/security.mjs +17 -0
- package/dist/nitro/setup/type-generation.d.mts +13 -0
- package/dist/nitro/setup/type-generation.mjs +16 -0
- package/dist/nitro/setup.d.mts +4 -3
- package/dist/nitro/setup.mjs +87 -74
- package/dist/nitro/state.d.mts +32 -0
- package/dist/nitro/state.mjs +58 -0
- package/dist/nitro/types/augmentation.d.mts +59 -0
- package/dist/nitro/types/augmentation.mjs +1 -0
- package/dist/nitro/types/config.d.mts +327 -0
- package/dist/nitro/types/config.mjs +1 -0
- package/dist/nitro/types/define.d.mts +13 -0
- package/dist/nitro/types/define.mjs +1 -0
- package/dist/nitro/types/index.d.mts +10 -0
- package/dist/nitro/types/index.mjs +1 -0
- package/dist/nitro/virtual/debug-info.d.mts +9 -0
- package/dist/nitro/virtual/debug-info.mjs +35 -0
- package/dist/nitro/virtual/graphql-config.d.mts +9 -0
- package/dist/nitro/virtual/graphql-config.mjs +33 -0
- package/dist/nitro/virtual/index.d.mts +25 -0
- package/dist/nitro/virtual/index.mjs +45 -0
- package/dist/nitro/virtual/module-config.d.mts +9 -0
- package/dist/nitro/virtual/module-config.mjs +10 -0
- package/dist/nitro/virtual/pubsub.d.mts +9 -0
- package/dist/nitro/virtual/pubsub.mjs +17 -0
- package/dist/nitro/virtual/server-directives.d.mts +9 -0
- package/dist/nitro/virtual/server-directives.mjs +12 -0
- package/dist/nitro/virtual/server-resolvers.d.mts +9 -0
- package/dist/nitro/virtual/server-resolvers.mjs +17 -0
- package/dist/nitro/virtual/server-schemas.d.mts +9 -0
- package/dist/nitro/virtual/server-schemas.mjs +31 -0
- package/dist/nitro/virtual/stubs.d.mts +42 -10
- package/dist/nitro/virtual/stubs.mjs +0 -5
- package/dist/nitro/virtual/utils.d.mts +15 -0
- package/dist/nitro/virtual/utils.mjs +26 -0
- package/dist/nitro/virtual/validation-schemas.d.mts +9 -0
- package/dist/nitro/virtual/validation-schemas.mjs +33 -0
- package/native/index.js +52 -52
- package/package.json +15 -15
- package/dist/cli/commands/index.d.mts +0 -5
- package/dist/cli/commands/index.mjs +0 -5
- package/dist/core/codegen/plugin.d.mts +0 -19
- package/dist/core/codegen/plugin.mjs +0 -29
- package/dist/core/config.d.mts +0 -45
- package/dist/core/config.mjs +0 -76
- package/dist/nitro/codegen.d.mts +0 -18
- package/dist/nitro/codegen.mjs +0 -171
- package/dist/nitro/config.d.mts +0 -50
- package/dist/nitro/config.mjs +0 -55
- package/dist/nitro/types.d.mts +0 -549
- package/dist/nitro/virtual/generators.d.mts +0 -38
- package/dist/nitro/virtual/generators.mjs +0 -190
- /package/dist/{nitro/types.mjs → core/types/standard-schema.mjs} +0 -0
package/README.md
CHANGED
|
@@ -82,5 +82,5 @@ See the [documentation](https://nitro-graphql.pages.dev) for Nuxt and Vite setup
|
|
|
82
82
|
[docs-href]: https://nitro-graphql.pages.dev
|
|
83
83
|
[beta-src]: https://img.shields.io/npm/v/nitro-graphql/beta?style=flat&logo=rocket&logoColor=white&label=beta&color=7c3aed&colorA=080f12
|
|
84
84
|
[beta-href]: https://github.com/productdevbook/nitro-graphql/releases
|
|
85
|
-
[coverage-src]: https://img.shields.io/badge/coverage-
|
|
85
|
+
[coverage-src]: https://img.shields.io/badge/coverage-71%25-green?style=flat&colorA=080f12
|
|
86
86
|
[coverage-href]: https://github.com/productdevbook/nitro-graphql/actions/workflows/ci.yml
|
package/dist/cli/adapter.d.mts
CHANGED
|
@@ -4,9 +4,6 @@ import { CLIContext } from "./index.mjs";
|
|
|
4
4
|
//#region src/cli/adapter.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* CLI Framework Adapter
|
|
7
|
-
*
|
|
8
|
-
* Enables the CLI to use the same core functions as the Nitro module.
|
|
9
|
-
* The adapter converts CLIContext to the types expected by core functions.
|
|
10
7
|
*/
|
|
11
8
|
declare const CLIAdapter: FrameworkAdapter<CLIContext>;
|
|
12
9
|
//#endregion
|
package/dist/cli/adapter.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { LOG_TAG } from "../core/constants.mjs";
|
|
2
|
-
import { createCoreConfig,
|
|
2
|
+
import { createCoreConfig, createScanContext } from "../core/create-config.mjs";
|
|
3
3
|
import consola from "consola";
|
|
4
4
|
//#region src/cli/adapter.ts
|
|
5
|
-
/**
|
|
6
|
-
* Create a CoreLogger from consola for CLI usage
|
|
7
|
-
*/
|
|
8
5
|
function createCLILogger() {
|
|
9
6
|
const logger = consola.withTag(LOG_TAG);
|
|
10
7
|
return {
|
|
@@ -17,9 +14,6 @@ function createCLILogger() {
|
|
|
17
14
|
}
|
|
18
15
|
/**
|
|
19
16
|
* CLI Framework Adapter
|
|
20
|
-
*
|
|
21
|
-
* Enables the CLI to use the same core functions as the Nitro module.
|
|
22
|
-
* The adapter converts CLIContext to the types expected by core functions.
|
|
23
17
|
*/
|
|
24
18
|
const CLIAdapter = {
|
|
25
19
|
name: "cli",
|
|
@@ -31,31 +25,14 @@ const CLIAdapter = {
|
|
|
31
25
|
clientDir: ctx.config.clientDir,
|
|
32
26
|
isNuxt: false,
|
|
33
27
|
isDev: true,
|
|
34
|
-
graphqlOptions: {
|
|
35
|
-
framework: ctx.config.framework,
|
|
36
|
-
endpoint: ctx.config.endpoint?.graphql,
|
|
37
|
-
security: ctx.config.security,
|
|
38
|
-
federation: ctx.config.federation,
|
|
39
|
-
externalServices: ctx.config.externalServices?.map((s) => ({
|
|
40
|
-
name: s.name,
|
|
41
|
-
endpoint: s.endpoint,
|
|
42
|
-
schema: (Array.isArray(s.schema) ? s.schema[0] : s.schema) || s.endpoint,
|
|
43
|
-
headers: s.headers,
|
|
44
|
-
documents: s.documents,
|
|
45
|
-
paths: s.paths ? {
|
|
46
|
-
sdk: typeof s.paths.sdk === "string" ? s.paths.sdk : void 0,
|
|
47
|
-
types: typeof s.paths.types === "string" ? s.paths.types : void 0
|
|
48
|
-
} : void 0
|
|
49
|
-
})),
|
|
50
|
-
codegen: ctx.config.codegen
|
|
51
|
-
},
|
|
52
28
|
logger: createCLILogger(),
|
|
53
|
-
ignorePatterns: ctx.config.ignore || []
|
|
29
|
+
ignorePatterns: ctx.config.ignore || [],
|
|
30
|
+
security: ctx.config.security,
|
|
31
|
+
federation: ctx.config.federation,
|
|
32
|
+
codegen: ctx.config.codegen,
|
|
33
|
+
externalServices: ctx.config.externalServices
|
|
54
34
|
});
|
|
55
35
|
},
|
|
56
|
-
createCoreContext: (ctx) => {
|
|
57
|
-
return createCoreContext(CLIAdapter.createCoreConfig(ctx));
|
|
58
|
-
},
|
|
59
36
|
createScanContext: (ctx) => {
|
|
60
37
|
return createScanContext(CLIAdapter.createCoreConfig(ctx));
|
|
61
38
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LOG_TAG } from "../../core/constants.mjs";
|
|
2
|
-
import { loadGraphQLDocuments } from "../../core/codegen/document-loader.mjs";
|
|
3
2
|
import { generateClientTypesCore } from "../../core/codegen/client.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { loadGraphQLDocuments } from "../../core/codegen/document-loader.mjs";
|
|
4
|
+
import { generateResolverModule, generateRuntimeIndex, generateSchemaModule } from "../../core/codegen/runtime-generator.mjs";
|
|
5
5
|
import { generateServerTypesCore } from "../../core/codegen/server.mjs";
|
|
6
6
|
import { scanDocumentsCore } from "../../core/scanning/documents.mjs";
|
|
7
7
|
import { scanResolversCore } from "../../core/scanning/resolvers.mjs";
|
package/dist/cli/config.d.mts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CLIGraphQLOptions } from "../nitro/types/config.mjs";
|
|
3
2
|
//#region src/cli/config.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* CLI configuration options
|
|
6
|
-
*
|
|
5
|
+
* Extends NitroGraphQLOptions with CLI-specific fields (rootDir, buildDir, etc.)
|
|
7
6
|
*/
|
|
8
|
-
type CLIConfig =
|
|
7
|
+
type CLIConfig = CLIGraphQLOptions;
|
|
9
8
|
/**
|
|
10
9
|
* Define CLI configuration with type safety
|
|
11
10
|
*/
|
|
12
|
-
declare function defineConfig(config: CLIConfig): CLIConfig
|
|
11
|
+
declare function defineConfig(config: Partial<CLIConfig>): Partial<CLIConfig>;
|
|
13
12
|
/**
|
|
14
13
|
* Default CLI configuration values
|
|
15
14
|
*/
|
package/dist/cli/config.mjs
CHANGED
|
@@ -10,9 +10,11 @@ function defineConfig(config) {
|
|
|
10
10
|
*/
|
|
11
11
|
const DEFAULT_CLI_CONFIG = {
|
|
12
12
|
framework: "graphql-yoga",
|
|
13
|
+
rootDir: ".",
|
|
14
|
+
buildDir: ".graphql",
|
|
13
15
|
serverDir: "server/graphql",
|
|
14
16
|
clientDir: "graphql",
|
|
15
|
-
|
|
17
|
+
typesDir: ".graphql/types",
|
|
16
18
|
ignore: ["**/node_modules/**", "**/dist/**"]
|
|
17
19
|
};
|
|
18
20
|
//#endregion
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CLIGraphQLOptions } from "../nitro/types/config.mjs";
|
|
2
2
|
import { CLIConfig, defineConfig } from "./config.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/index.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* CLI context with resolved configuration
|
|
7
|
-
* Uses NitroGraphQLOptions directly as CLI and module options are now unified
|
|
8
7
|
*/
|
|
9
8
|
interface CLIContext {
|
|
10
|
-
config:
|
|
11
|
-
ignore: string[];
|
|
12
|
-
} & NitroGraphQLOptions;
|
|
9
|
+
config: CLIGraphQLOptions;
|
|
13
10
|
cwd: string;
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* Load CLI configuration from file or defaults
|
|
17
14
|
*/
|
|
18
|
-
declare function loadConfig(cwd?: string): Promise<
|
|
15
|
+
declare function loadConfig(cwd?: string): Promise<Partial<CLIGraphQLOptions>>;
|
|
19
16
|
/**
|
|
20
17
|
* Create CLI context from configuration
|
|
21
18
|
*/
|
package/dist/cli/index.mjs
CHANGED
|
@@ -40,7 +40,7 @@ async function createCLIContext(options = {}) {
|
|
|
40
40
|
const cwd = options.cwd || getCwd();
|
|
41
41
|
const config = await loadConfig(cwd);
|
|
42
42
|
const rootDir = config.rootDir ? resolve(cwd, config.rootDir) : cwd;
|
|
43
|
-
const buildDir = config.buildDir ? resolve(rootDir, config.buildDir) : resolve(rootDir, ".
|
|
43
|
+
const buildDir = config.buildDir ? resolve(rootDir, config.buildDir) : resolve(rootDir, ".graphql");
|
|
44
44
|
const serverDir = config.serverDir ? resolve(rootDir, config.serverDir) : resolve(rootDir, "server/graphql");
|
|
45
45
|
const clientDir = config.clientDir ? resolve(rootDir, config.clientDir) : resolve(rootDir, "graphql");
|
|
46
46
|
const typesDir = config.typesDir ? resolve(rootDir, config.typesDir) : resolve(buildDir, "types");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BASE_SCHEMA
|
|
1
|
+
import { BASE_SCHEMA } from "../../core/schema/builder.mjs";
|
|
2
|
+
import { createYogaServer } from "../../core/server/yoga.mjs";
|
|
2
3
|
import { loadDirectiveDefinitions, loadResolverDefinitions, loadSchemaDefinitions } from "./loader.mjs";
|
|
3
4
|
import consola from "consola";
|
|
4
5
|
//#region src/cli/server/graphql-handler.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LOG_TAG } from "../../core/constants.mjs";
|
|
2
|
-
import { closeWatcher, createCoreWatcher } from "../../core/watcher/
|
|
2
|
+
import { closeWatcher, createCoreWatcher } from "../../core/watcher/create-watcher.mjs";
|
|
3
3
|
import { generateAll } from "../commands/generate.mjs";
|
|
4
4
|
import consola from "consola";
|
|
5
5
|
//#region src/cli/server/watcher.ts
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, ExternalServiceCodegenConfig } from "../types/codegen.mjs";
|
|
2
|
-
import { loadGraphQLDocuments } from "./document-loader.mjs";
|
|
3
|
-
import { GraphQLLoadSchemaOptions, GraphQLTypeDefPointer, downloadAndSaveSchema, graphQLLoadSchemaSync, loadExternalSchema } from "./schema-loader.mjs";
|
|
4
2
|
import { Source } from "@graphql-tools/utils";
|
|
5
|
-
import
|
|
3
|
+
import * as graphql from "graphql";
|
|
6
4
|
|
|
7
5
|
//#region src/core/codegen/client.d.ts
|
|
8
6
|
/**
|
|
@@ -11,32 +9,11 @@ import { GraphQLSchema } from "graphql";
|
|
|
11
9
|
declare const DEFAULT_CLIENT_CODEGEN_CONFIG: ClientCodegenConfig;
|
|
12
10
|
/**
|
|
13
11
|
* Generate client-side GraphQL types
|
|
14
|
-
* Pure function that generates TypeScript types from a GraphQL schema and documents
|
|
15
12
|
*/
|
|
16
13
|
declare function generateClientTypesCore(input: ClientCodegenInput): Promise<ClientCodegenResult | false>;
|
|
17
14
|
/**
|
|
18
|
-
* Generate client types for external GraphQL service
|
|
15
|
+
* Generate client types for an external GraphQL service
|
|
19
16
|
*/
|
|
20
|
-
declare function generateExternalClientTypesCore(service: ExternalServiceCodegenConfig, schema: GraphQLSchema, documents: Source[], virtualTypesPath?: string): Promise<ClientCodegenResult | false>;
|
|
21
|
-
/**
|
|
22
|
-
* Subscription info extracted from GraphQL documents
|
|
23
|
-
*/
|
|
24
|
-
interface SubscriptionInfo {
|
|
25
|
-
/** Original operation name from GraphQL document (used for method names) */
|
|
26
|
-
name: string;
|
|
27
|
-
/** PascalCase version for type references (matches GraphQL codegen output) */
|
|
28
|
-
typeName: string;
|
|
29
|
-
fieldName: string;
|
|
30
|
-
hasVariables: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Extract subscription operations from GraphQL documents
|
|
34
|
-
*/
|
|
35
|
-
declare function extractSubscriptions(docs: Source[]): SubscriptionInfo[];
|
|
36
|
-
/**
|
|
37
|
-
* Generate subscription builder code (Drizzle-style API) + Vue Composables
|
|
38
|
-
* Returns empty string if subscriptions are not enabled or no subscription operations found
|
|
39
|
-
*/
|
|
40
|
-
declare function generateSubscriptionBuilder(docs: Source[], subscriptionsEnabled: boolean): string;
|
|
17
|
+
declare function generateExternalClientTypesCore(service: ExternalServiceCodegenConfig, schema: graphql.GraphQLSchema, documents: Source[], virtualTypesPath?: string): Promise<ClientCodegenResult | false>;
|
|
41
18
|
//#endregion
|
|
42
|
-
export { DEFAULT_CLIENT_CODEGEN_CONFIG,
|
|
19
|
+
export { DEFAULT_CLIENT_CODEGEN_CONFIG, generateClientTypesCore, generateExternalClientTypesCore };
|