@tinkerstack/graphql-annotation 0.0.6 → 0.0.8
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/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/modules/core/annotation.loader.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -369,6 +369,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
369
369
|
return loaded2;
|
|
370
370
|
} catch (err) {
|
|
371
371
|
this._logger.error(`Unable to load schema for ${loadId}`);
|
|
372
|
+
this._logger.error(err);
|
|
372
373
|
throw err;
|
|
373
374
|
}
|
|
374
375
|
});
|
|
@@ -376,7 +377,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
376
377
|
const shouldThrow = !(opts?.ignoreMissingSources ?? false);
|
|
377
378
|
if (failed.length > 0) {
|
|
378
379
|
if (shouldThrow) throw new Error(`Failed to load ${failed.length} schema(s) from sources.`);
|
|
379
|
-
else this._logger.warn(`Failed to load ${failed.length}
|
|
380
|
+
else this._logger.warn(`Failed to load ${failed.length} schema(s) from sources.`);
|
|
380
381
|
}
|
|
381
382
|
return loaded.map((l) => l.value);
|
|
382
383
|
}
|
|
@@ -395,6 +396,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
395
396
|
return res.data[ANNOTATION_QUERY_NAME];
|
|
396
397
|
} catch (err) {
|
|
397
398
|
this._logger.warn(`Failed to load annotations at ${url}, assuming empty`);
|
|
399
|
+
this._logger.warn(err);
|
|
398
400
|
return {};
|
|
399
401
|
}
|
|
400
402
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -340,6 +340,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
340
340
|
return loaded2;
|
|
341
341
|
} catch (err) {
|
|
342
342
|
this._logger.error(`Unable to load schema for ${loadId}`);
|
|
343
|
+
this._logger.error(err);
|
|
343
344
|
throw err;
|
|
344
345
|
}
|
|
345
346
|
});
|
|
@@ -347,7 +348,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
347
348
|
const shouldThrow = !(opts?.ignoreMissingSources ?? false);
|
|
348
349
|
if (failed.length > 0) {
|
|
349
350
|
if (shouldThrow) throw new Error(`Failed to load ${failed.length} schema(s) from sources.`);
|
|
350
|
-
else this._logger.warn(`Failed to load ${failed.length}
|
|
351
|
+
else this._logger.warn(`Failed to load ${failed.length} schema(s) from sources.`);
|
|
351
352
|
}
|
|
352
353
|
return loaded.map((l) => l.value);
|
|
353
354
|
}
|
|
@@ -366,6 +367,7 @@ var GraphQLAnnotatedSchemaLoader = class {
|
|
|
366
367
|
return res.data[ANNOTATION_QUERY_NAME];
|
|
367
368
|
} catch (err) {
|
|
368
369
|
this._logger.warn(`Failed to load annotations at ${url}, assuming empty`);
|
|
370
|
+
this._logger.warn(err);
|
|
369
371
|
return {};
|
|
370
372
|
}
|
|
371
373
|
}
|
package/package.json
CHANGED
|
@@ -140,6 +140,7 @@ export class GraphQLAnnotatedSchemaLoader {
|
|
|
140
140
|
return loaded;
|
|
141
141
|
} catch (err) {
|
|
142
142
|
this._logger.error(`Unable to load schema for ${loadId}`);
|
|
143
|
+
this._logger.error(err);
|
|
143
144
|
throw err;
|
|
144
145
|
}
|
|
145
146
|
});
|
|
@@ -155,7 +156,10 @@ export class GraphQLAnnotatedSchemaLoader {
|
|
|
155
156
|
throw new Error(
|
|
156
157
|
`Failed to load ${failed.length} schema(s) from sources.`,
|
|
157
158
|
);
|
|
158
|
-
else
|
|
159
|
+
else
|
|
160
|
+
this._logger.warn(
|
|
161
|
+
`Failed to load ${failed.length} schema(s) from sources.`,
|
|
162
|
+
);
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
return loaded.map((l) => l.value);
|
|
@@ -181,6 +185,7 @@ export class GraphQLAnnotatedSchemaLoader {
|
|
|
181
185
|
return res.data[ANNOTATION_QUERY_NAME];
|
|
182
186
|
} catch (err) {
|
|
183
187
|
this._logger.warn(`Failed to load annotations at ${url}, assuming empty`);
|
|
188
|
+
this._logger.warn(err);
|
|
184
189
|
return {} as GraphQLAnnotationMeta;
|
|
185
190
|
}
|
|
186
191
|
}
|