@graphql-codegen/cli 3.3.1-rc-20230421150801-321a50040 → 3.3.2-rc-20230511093421-b95e8da31

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 CHANGED
@@ -215,10 +215,20 @@ async function executeCodegen(input) {
215
215
  }
216
216
  const hash = JSON.stringify(documentPointerMap);
217
217
  const result = await cache('documents', hash, async () => {
218
- const documents = await context.loadDocuments(documentPointerMap);
219
- return {
220
- documents,
221
- };
218
+ try {
219
+ const documents = await context.loadDocuments(documentPointerMap);
220
+ return {
221
+ documents,
222
+ };
223
+ }
224
+ catch (error) {
225
+ if (config.ignoreNoDocuments) {
226
+ return {
227
+ documents: [],
228
+ };
229
+ }
230
+ throw error;
231
+ }
222
232
  });
223
233
  outputDocuments = result.documents;
224
234
  }, filename, `Load GraphQL documents: ${filename}`, ctx),
package/esm/codegen.js CHANGED
@@ -211,10 +211,20 @@ export async function executeCodegen(input) {
211
211
  }
212
212
  const hash = JSON.stringify(documentPointerMap);
213
213
  const result = await cache('documents', hash, async () => {
214
- const documents = await context.loadDocuments(documentPointerMap);
215
- return {
216
- documents,
217
- };
214
+ try {
215
+ const documents = await context.loadDocuments(documentPointerMap);
216
+ return {
217
+ documents,
218
+ };
219
+ }
220
+ catch (error) {
221
+ if (config.ignoreNoDocuments) {
222
+ return {
223
+ documents: [],
224
+ };
225
+ }
226
+ throw error;
227
+ }
218
228
  });
219
229
  outputDocuments = result.documents;
220
230
  }, filename, `Load GraphQL documents: ${filename}`, ctx),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "3.3.1-rc-20230421150801-321a50040",
3
+ "version": "3.3.2-rc-20230511093421-b95e8da31",
4
4
  "peerDependencies": {
5
5
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "@babel/template": "^7.18.10",
10
10
  "@babel/types": "^7.18.13",
11
11
  "@graphql-codegen/core": "^3.1.0",
12
- "@graphql-codegen/plugin-helpers": "^4.2.0",
12
+ "@graphql-codegen/plugin-helpers": "4.2.1-rc-20230511093421-b95e8da31",
13
13
  "@graphql-tools/apollo-engine-loader": "^7.3.6",
14
14
  "@graphql-tools/code-file-loader": "^7.3.17",
15
15
  "@graphql-tools/git-loader": "^7.2.13",