@graphql-codegen/cli 5.0.6-alpha-20250415140744-b317db751515fd32d98f91d35454745ec9572e4a → 5.0.6-alpha-20250417103831-601add735d2704c7e3bea00c23d2a787517f8527
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/cjs/codegen.js +1 -2
- package/cjs/load.js +2 -5
- package/esm/codegen.js +1 -2
- package/esm/load.js +3 -6
- package/package.json +4 -4
package/cjs/codegen.js
CHANGED
|
@@ -8,7 +8,6 @@ const os_1 = require("os");
|
|
|
8
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
9
|
const core_1 = require("@graphql-codegen/core");
|
|
10
10
|
const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
|
|
11
|
-
const load_1 = require("@graphql-tools/load");
|
|
12
11
|
const graphql_1 = require("graphql");
|
|
13
12
|
const listr2_1 = require("listr2");
|
|
14
13
|
const config_js_1 = require("./config.js");
|
|
@@ -222,7 +221,7 @@ async function executeCodegen(input) {
|
|
|
222
221
|
};
|
|
223
222
|
}
|
|
224
223
|
catch (error) {
|
|
225
|
-
if (
|
|
224
|
+
if (config.ignoreNoDocuments) {
|
|
226
225
|
return {
|
|
227
226
|
documents: [],
|
|
228
227
|
};
|
package/cjs/load.js
CHANGED
|
@@ -88,11 +88,8 @@ async function loadDocuments(documentPointers, config) {
|
|
|
88
88
|
return loadedFromToolkit;
|
|
89
89
|
}
|
|
90
90
|
catch (error) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
throw error;
|
|
94
|
-
}
|
|
95
|
-
// For other errors, we need to add an error message with documentPointers, so it's better for DevX
|
|
91
|
+
if (config.ignoreNoDocuments)
|
|
92
|
+
return [];
|
|
96
93
|
throw new Error([`Failed to load documents from ${Object.keys(documentPointers).join(',')}:`, printError(error)].join('\n'));
|
|
97
94
|
}
|
|
98
95
|
}
|
package/esm/codegen.js
CHANGED
|
@@ -4,7 +4,6 @@ import { cpus } from 'os';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { codegen } from '@graphql-codegen/core';
|
|
6
6
|
import { getCachedDocumentNodeFromSchema, normalizeConfig, normalizeInstanceOrArray, normalizeOutputParam, } from '@graphql-codegen/plugin-helpers';
|
|
7
|
-
import { NoTypeDefinitionsFound } from '@graphql-tools/load';
|
|
8
7
|
import { GraphQLError } from 'graphql';
|
|
9
8
|
import { Listr } from 'listr2';
|
|
10
9
|
import { ensureContext, shouldEmitLegacyCommonJSImports } from './config.js';
|
|
@@ -218,7 +217,7 @@ export async function executeCodegen(input) {
|
|
|
218
217
|
};
|
|
219
218
|
}
|
|
220
219
|
catch (error) {
|
|
221
|
-
if (
|
|
220
|
+
if (config.ignoreNoDocuments) {
|
|
222
221
|
return {
|
|
223
222
|
documents: [],
|
|
224
223
|
};
|
package/esm/load.js
CHANGED
|
@@ -5,7 +5,7 @@ import { GitLoader } from '@graphql-tools/git-loader';
|
|
|
5
5
|
import { GithubLoader } from '@graphql-tools/github-loader';
|
|
6
6
|
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
|
|
7
7
|
import { JsonFileLoader } from '@graphql-tools/json-file-loader';
|
|
8
|
-
import { loadDocuments as loadDocumentsToolkit, loadSchema as loadSchemaToolkit,
|
|
8
|
+
import { loadDocuments as loadDocumentsToolkit, loadSchema as loadSchemaToolkit, } from '@graphql-tools/load';
|
|
9
9
|
import { PrismaLoader } from '@graphql-tools/prisma-loader';
|
|
10
10
|
import { UrlLoader } from '@graphql-tools/url-loader';
|
|
11
11
|
import { GraphQLError } from 'graphql';
|
|
@@ -83,11 +83,8 @@ export async function loadDocuments(documentPointers, config) {
|
|
|
83
83
|
return loadedFromToolkit;
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
throw error;
|
|
89
|
-
}
|
|
90
|
-
// For other errors, we need to add an error message with documentPointers, so it's better for DevX
|
|
86
|
+
if (config.ignoreNoDocuments)
|
|
87
|
+
return [];
|
|
91
88
|
throw new Error([`Failed to load documents from ${Object.keys(documentPointers).join(',')}:`, printError(error)].join('\n'));
|
|
92
89
|
}
|
|
93
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/cli",
|
|
3
|
-
"version": "5.0.6-alpha-
|
|
3
|
+
"version": "5.0.6-alpha-20250417103831-601add735d2704c7e3bea00c23d2a787517f8527",
|
|
4
4
|
"peerDependenciesMeta": {
|
|
5
5
|
"@parcel/watcher": {
|
|
6
6
|
"optional": true
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@babel/generator": "^7.18.13",
|
|
15
15
|
"@babel/template": "^7.18.10",
|
|
16
16
|
"@babel/types": "^7.18.13",
|
|
17
|
-
"@graphql-codegen/client-preset": "4.8.1-alpha-
|
|
17
|
+
"@graphql-codegen/client-preset": "4.8.1-alpha-20250417103831-601add735d2704c7e3bea00c23d2a787517f8527",
|
|
18
18
|
"@graphql-codegen/core": "^4.0.2",
|
|
19
19
|
"@graphql-codegen/plugin-helpers": "^5.0.3",
|
|
20
20
|
"@graphql-tools/apollo-engine-loader": "^8.0.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@graphql-tools/github-loader": "^8.0.0",
|
|
24
24
|
"@graphql-tools/graphql-file-loader": "^8.0.0",
|
|
25
25
|
"@graphql-tools/json-file-loader": "^8.0.0",
|
|
26
|
-
"@graphql-tools/load": "^8.
|
|
26
|
+
"@graphql-tools/load": "^8.0.0",
|
|
27
27
|
"@graphql-tools/prisma-loader": "^8.0.0",
|
|
28
28
|
"@graphql-tools/url-loader": "^8.0.0",
|
|
29
29
|
"@graphql-tools/utils": "^10.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"cosmiconfig": "^8.1.3",
|
|
33
33
|
"debounce": "^1.2.0",
|
|
34
34
|
"detect-indent": "^6.0.0",
|
|
35
|
-
"graphql-config": "^5.1.
|
|
35
|
+
"graphql-config": "^5.1.1",
|
|
36
36
|
"inquirer": "^8.0.0",
|
|
37
37
|
"is-glob": "^4.0.1",
|
|
38
38
|
"jiti": "^1.17.1",
|