@graphql-codegen/plugin-helpers 2.7.2-alpha-20221025134913-ec8a36be2 → 2.7.2-alpha-20221031145604-c8709223b

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/errors.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDetailedError = exports.DetailedError = void 0;
4
+ class DetailedError extends Error {
5
+ constructor(message, details, source) {
6
+ super(message);
7
+ this.message = message;
8
+ this.details = details;
9
+ this.source = source;
10
+ Object.setPrototypeOf(this, DetailedError.prototype);
11
+ Error.captureStackTrace(this, DetailedError);
12
+ }
13
+ }
14
+ exports.DetailedError = DetailedError;
15
+ function isDetailedError(error) {
16
+ return error.details;
17
+ }
18
+ exports.isDetailedError = isDetailedError;
package/cjs/index.js CHANGED
@@ -8,6 +8,7 @@ tslib_1.__exportStar(require("./types.js"), exports);
8
8
  tslib_1.__exportStar(require("./utils.js"), exports);
9
9
  tslib_1.__exportStar(require("./helpers.js"), exports);
10
10
  tslib_1.__exportStar(require("./federation.js"), exports);
11
+ tslib_1.__exportStar(require("./errors.js"), exports);
11
12
  tslib_1.__exportStar(require("./getCachedDocumentNodeFromSchema.js"), exports);
12
13
  tslib_1.__exportStar(require("./oldVisit.js"), exports);
13
14
  tslib_1.__exportStar(require("./profiler.js"), exports);
package/esm/errors.js ADDED
@@ -0,0 +1,13 @@
1
+ export class DetailedError extends Error {
2
+ constructor(message, details, source) {
3
+ super(message);
4
+ this.message = message;
5
+ this.details = details;
6
+ this.source = source;
7
+ Object.setPrototypeOf(this, DetailedError.prototype);
8
+ Error.captureStackTrace(this, DetailedError);
9
+ }
10
+ }
11
+ export function isDetailedError(error) {
12
+ return error.details;
13
+ }
package/esm/index.js CHANGED
@@ -3,6 +3,7 @@ export * from './types.js';
3
3
  export * from './utils.js';
4
4
  export * from './helpers.js';
5
5
  export * from './federation.js';
6
+ export * from './errors.js';
6
7
  export * from './getCachedDocumentNodeFromSchema.js';
7
8
  export * from './oldVisit.js';
8
9
  export * from './profiler.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/plugin-helpers",
3
- "version": "2.7.2-alpha-20221025134913-ec8a36be2",
3
+ "version": "2.7.2-alpha-20221031145604-c8709223b",
4
4
  "description": "GraphQL Code Generator common utils and types",
5
5
  "peerDependencies": {
6
6
  "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"
@@ -0,0 +1,7 @@
1
+ export declare class DetailedError extends Error {
2
+ message: string;
3
+ details: string;
4
+ source?: string;
5
+ constructor(message: string, details: string, source?: string);
6
+ }
7
+ export declare function isDetailedError(error: any): error is DetailedError;
@@ -0,0 +1,7 @@
1
+ export declare class DetailedError extends Error {
2
+ message: string;
3
+ details: string;
4
+ source?: string;
5
+ constructor(message: string, details: string, source?: string);
6
+ }
7
+ export declare function isDetailedError(error: any): error is DetailedError;
@@ -3,6 +3,7 @@ export * from './types.cjs';
3
3
  export * from './utils.cjs';
4
4
  export * from './helpers.cjs';
5
5
  export * from './federation.cjs';
6
+ export * from './errors.cjs';
6
7
  export * from './getCachedDocumentNodeFromSchema.cjs';
7
8
  export * from './oldVisit.cjs';
8
9
  export * from './profiler.cjs';
@@ -3,6 +3,7 @@ export * from './types.js';
3
3
  export * from './utils.js';
4
4
  export * from './helpers.js';
5
5
  export * from './federation.js';
6
+ export * from './errors.js';
6
7
  export * from './getCachedDocumentNodeFromSchema.js';
7
8
  export * from './oldVisit.js';
8
9
  export * from './profiler.js';