@graphql-mesh/store 0.9.15 → 0.9.17
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/index.js +7 -5
- package/esm/index.js +8 -6
- package/package.json +3 -3
package/cjs/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MeshStore = exports.PredefinedProxyOptions = exports.PredefinedProxyOptionsName = exports.FsStoreStorageAdapter = exports.InMemoryStoreStorageAdapter = exports.ValidationError = exports.ReadonlyStoreError = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
const core_1 = require("@graphql-inspector/core");
|
|
4
6
|
const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
|
|
5
7
|
const utils_1 = require("@graphql-mesh/utils");
|
|
6
|
-
const core_1 = require("@graphql-inspector/core");
|
|
7
8
|
const utils_2 = require("@graphql-tools/utils");
|
|
8
|
-
const graphql_1 = require("graphql");
|
|
9
9
|
class ReadonlyStoreError extends Error {
|
|
10
10
|
}
|
|
11
11
|
exports.ReadonlyStoreError = ReadonlyStoreError;
|
|
@@ -111,8 +111,10 @@ export default buildASTSchema(schemaAST, {
|
|
|
111
111
|
const changes = await (0, core_1.diff)(oldSchema, newSchema);
|
|
112
112
|
const errors = [];
|
|
113
113
|
for (const change of changes) {
|
|
114
|
-
if (change.criticality.level === core_1.CriticalityLevel.Breaking ||
|
|
115
|
-
change.criticality.level === core_1.CriticalityLevel.Dangerous)
|
|
114
|
+
if ((change.criticality.level === core_1.CriticalityLevel.Breaking ||
|
|
115
|
+
change.criticality.level === core_1.CriticalityLevel.Dangerous) &&
|
|
116
|
+
!change.message.includes('@specifiedBy') &&
|
|
117
|
+
!change.message.includes('@deprecated')) {
|
|
116
118
|
errors.push(change.message);
|
|
117
119
|
}
|
|
118
120
|
}
|
|
@@ -121,7 +123,7 @@ export default buildASTSchema(schemaAST, {
|
|
|
121
123
|
throw errors[0];
|
|
122
124
|
}
|
|
123
125
|
else {
|
|
124
|
-
throw new
|
|
126
|
+
throw new Error(`Breaking changes found; \n${errors.map(error => `- ${error}`).join('\n')}`);
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
},
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { buildASTSchema } from 'graphql';
|
|
2
|
+
import { CriticalityLevel, diff } from '@graphql-inspector/core';
|
|
1
3
|
import { fs, path as pathModule } from '@graphql-mesh/cross-helpers';
|
|
2
4
|
import { writeFile } from '@graphql-mesh/utils';
|
|
3
|
-
import {
|
|
4
|
-
import { getDocumentNodeFromSchema, AggregateError } from '@graphql-tools/utils';
|
|
5
|
-
import { buildASTSchema } from 'graphql';
|
|
5
|
+
import { getDocumentNodeFromSchema } from '@graphql-tools/utils';
|
|
6
6
|
export class ReadonlyStoreError extends Error {
|
|
7
7
|
}
|
|
8
8
|
export class ValidationError extends Error {
|
|
@@ -104,8 +104,10 @@ export default buildASTSchema(schemaAST, {
|
|
|
104
104
|
const changes = await diff(oldSchema, newSchema);
|
|
105
105
|
const errors = [];
|
|
106
106
|
for (const change of changes) {
|
|
107
|
-
if (change.criticality.level === CriticalityLevel.Breaking ||
|
|
108
|
-
change.criticality.level === CriticalityLevel.Dangerous)
|
|
107
|
+
if ((change.criticality.level === CriticalityLevel.Breaking ||
|
|
108
|
+
change.criticality.level === CriticalityLevel.Dangerous) &&
|
|
109
|
+
!change.message.includes('@specifiedBy') &&
|
|
110
|
+
!change.message.includes('@deprecated')) {
|
|
109
111
|
errors.push(change.message);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
@@ -114,7 +116,7 @@ export default buildASTSchema(schemaAST, {
|
|
|
114
116
|
throw errors[0];
|
|
115
117
|
}
|
|
116
118
|
else {
|
|
117
|
-
throw new
|
|
119
|
+
throw new Error(`Breaking changes found; \n${errors.map(error => `- ${error}`).join('\n')}`);
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/store",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@graphql-inspector/core": "3.3.0",
|
|
10
10
|
"@graphql-mesh/cross-helpers": "0.3.3",
|
|
11
|
-
"@graphql-mesh/types": "0.91.
|
|
12
|
-
"@graphql-mesh/utils": "0.43.
|
|
11
|
+
"@graphql-mesh/types": "0.91.9",
|
|
12
|
+
"@graphql-mesh/utils": "0.43.17",
|
|
13
13
|
"@graphql-tools/utils": "9.2.1",
|
|
14
14
|
"tslib": "^2.4.0"
|
|
15
15
|
},
|